microsoft office infopath 2003 developer's referenceschema.xsd the xml schema files that are...

4015

Upload: others

Post on 27-Jul-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AbouttheInfoPathDeveloper'sReference

TheInfoPathDeveloper'sReferencecontainsHelpinthefollowingareas:

ProgrammingConceptsContainsconceptualinformationaboutMicrosoftOfficeInfoPath2003formdevelopment.Subjectareasincludeformarchitecture,theformdefinition(.xsf)file,theprogrammingenvironment,andusingtheInfoPathobjectmodel.

DeveloperSampleFormsContainsdocumentationforasetofformsdesignedtodemonstratevariousdevelopmenttechniquesforcustomizingandimplementingInfoPathfeatures.

InfoPathObjectModelReferenceContainsdocumentationfortheInfoPathobjectmodel,includingallofitscollections,objects,properties,methods,events,andenumerations.

InfoPathXSFReferenceContainsdocumentationfortheInfoPath.xsffile,includingallofitsnamespaces,types,groups,elements,andattributes.

Page 3: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 4: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AboutActiveXcontrols

YoucanhostActiveXcontrolsinforms.Thesecontrolscanbepreexisting(withsomeconstraints)orcanbewrittenspecificallyforInfoPath.

WriteanActiveXcontrol

AddanActiveXcontroltotheInfoPathdesignenvironment

DeployanActiveXcontrol

Page 5: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 6: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AboutADO.NETdatasetintegration

YoucaneasilyconnectformstoWebservicesthatreceivedatafromandsubmitdatatoADO.NETdatasets.

ConnectingformstoWebservicestoreceivedata

ConnectingformstoWebservicestoreceiveandsubmitdata

ConnectingformstoWebservicestosubmitdata

Thereareafewlimitationsondatasets:

Onlyonedatasetisallowedwhenaformisedited.

Copyingandpastingofnesteddatasetsupdatestheforeignkeytopointtotheparentvalues.

DeleteRuleandUpdateRulepropertiesarenotsupported.

Constraintsorrelationshipscannotbedisabled.

Page 7: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 8: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Aboutbackwardcompatibility

InMicrosoftOffice2003EditionsServicePack1,existingformsfunctionthesamewaytheydidinMicrosoftOfficeInfoPath2003,whiletakingadvantageoftheimprovementsandnewfeaturesincludedintheservicepack.ToensurecompatibilityforusersofMicrosoftOfficeInfoPath2003withoutServicePack1orlaterinstalled,however,certainfeaturesarenotavailabletoexistingforms.

ThefollowingsectionsdescribeareasoffunctionalitythatmaybeaffectedwhenyouareworkingwithmorethanoneversionofInfoPath.

Upgradingexistingforms

Creatingnewformtemplates

Removingnewfeaturesfromaformtemplate

Disablingnewfeatures

Openingformtemplatesthatcontainformcodewithupdatedobjectmodelmembers

LaunchingandautomatingInfoPathfromanotherapplication

Page 9: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 10: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Aboutchangingaform'smaindatasource

Attimes,youmayneedtomodifyaformtouseadifferentXMLSchema,databaseserver,orWebservicebeforeorafterdeployment.Youdonothavetomodifytheformdefinitionfile(.xsf)toaccomplishthistask,however,becausewithMicrosoftOfficeInfoPath2003ServicePack1orlater,youcanchangethemaindatasourceofyourformthroughtheInfoPathdesigner.

Thestepsyouneedtotaketodothisdiffer,dependingonwhetheryourform'smaindatasourceisanXMLSchema,anXMLdocument,oradataconnection.

ChangethemaindatasourceofaformbasedonanXMLSchemaorXMLdocument.

Changethemaindatasourceofaformbasedonadataconnection.

Page 11: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Aboutdigitalsignatures

Takeadvantageofthefollowingnewfunctionsthathavebeenaddedtothedigitalsignaturesfeature:

Enablesignaturesfortheentireform,orforspecificsetsofdataintheformthatcanbesignedseparately.

Foreachsetofdatathatcanbesigned,specifywhetherasingleormultiplesignaturesareallowedandwhattheirrelationshipwillbe.Forexample,youcanspecifywhethertheyareparallelcosignaturesorwhethereachnewsignaturecountersignsalltheearlierones.

Specifyamessagetobeshowntoformusersastheysigntheform.

Insertandseeasignatureinthedocument,andviewtheformasitwaspresentedtoeachsigner.

Viewverifiablenonrepudiationinformationthathasbeenaddedtoeachsignatureforincreasedsecurity.Thisadditionalinformationispartofthesignatureandcannotberemovedwithoutinvalidatingthesignature.Atanytime,youcanrecallthisdatabyclickingonthesignatureintheform.

Addcustominformationtothesignatureblockinfullytrustedformsthroughanextensivedigitalsignatureobjectmodel.

Accessasignaturethroughasnapshot.Thesnapshotisafilein.pngformat.Itcontainsaviewofthesignaturewithintheformandhasallitsnonrepudiationinformation.

Page 12: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 13: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Aboutenablingformstosubmitdata

MicrosoftOfficeInfoPath2003allowsyoutosubmitdataenteredintoaformtoaWebserviceoraWindowsSharePointServicesformlibrary,orasanattachmenttoane-mailmessage.

SetupaconnectiontoaSharePointServicesformlibrarythatisenabledforformsubmission.

Setupane-mailmessagethatisenabledforformsubmission.

SetupaconnectiontoaWebservicethatisenabledfordatasubmission.

Page 14: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 15: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Aboutformarchitecture

MicrosoftOfficeInfoPath2003formsarecomposedofseveralfilesandcomponentsthatarecombinedtoprovidespecificfunctionalityforaparticularenduserscenarioorbusinessneed.InfoPathformscanvaryincomplexitydependingonthetypeofneedthattheyaddress.

AnInfoPathformisessentiallyatypeofapplicationthatcreatesaspecifiedclassofXMLdocuments,definestheirlayoutandeditingbehavior,enforcestheirdataconsistency,andprovidestheroutinginformationthatindicateswheretheyshouldbestored.

ItisimportanttounderstandthatInfoPathformsarecomposedofseveraldifferentfilesofmanydifferenttypes;thesefilesarecollectivelyknownastheformfiles.Usually,anInfoPathformiscomposedofthefollowingtypesoffiles.

Name Extension DescriptionFormdefinition

.xsf AnInfoPath-generatedfilethatcontainsinformationaboutalloftheotherfilesandcomponentsusedinaform.Thisfileservesasthemanifestfortheform.

XMLSchema

.xsd TheXMLSchemafilesthatareusedtoconstrainandvalidateaform'sunderlyingXMLdocumentfiles.

View .xsl Thepresentationlogicfilesthatareusedtopresent,view,andtransformthedatacontainedinaform'sunderlyingXMLdocumentfiles.

XMLtemplate

.xml The.xmlfilethatcontainsthedefaultdatathatisdisplayedinaviewwhenanewformiscreated.

XMLcomponenttemplate

.xct The.xmlfilerepresentationsoftheeditingcontrolsthatareusedwhencreatingandfillingoutaform.

Presentation .htm,.gif,.bmp,andothers

Thefilesusedinconjunctionwiththeviewfilestocreateacustomuserinterface.

Page 16: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Businesslogic

.js,.vbs Thescriptfiles(MicrosoftJScriptandMicrosoftVBScript)thatcontainprogrammingcodeusedtoimplementspecificeditingbehavior,datavalidation,eventhandlers,controlofdataflow,andothercustombusinesslogic.

Binary .dll,.exe ThecustomComponentObjectModel(COM)componentsthatprovideadditionalbusinesslogic.

Formtemplate

.xsn Thecompressedfileformat(.cab)thatpackagesalltheformfilesintoonefile.

Page 17: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 18: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AboutHumanWorkflowServicessupport

HumanWorkflowServices(HWS)isaserviceprovidedbyMicrosoftBizTalkServer2004thatenablesclientapplicationstobuildandmanagehuman-orientedworkflow.MicrosoftOfficeInfoPath2003providesaccesstothisservicebywayoftheWorkflowtaskpane.Inthistaskpane,userscanstartandtrackHWSactionsandrespondtoHWStasks.InfoPathdoesnotprovideadesignerinterfacetoenabletheWorkflowtaskpane;allHWSfunctionalityisenabledbymodifyingtheformdefinitionfile(.xsf).

Page 19: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheWorkflowTaskPaneTheWorkflowtaskpaneallowstheusertostartorextendaworkfloworrespondtoatask.

ThethreesectionsoftheWorkflowtaskpaneare:

StartWorkflowConsistsoftheactionbuttonsthatcanbeusedtostartaworkflow.ThissectionisonlyvisibleforformsthatareHWSenabledandthatdonothaveanexistingworkflowassociatedwiththem.

ActionTracksthestatusofactionsandtheirassociatedtasks.Onceauserstartsanaction,theactionrunsandistrackedbytheHWSservice.InfoPathdisplaysthestatusoftheactionandwhoisassignedthetask.

TaskAllowstheusertoworkwithtasks.Whenataskisassignedtoauser,InfoPathdisplaysthestatusofthetask,abuttontoresponddirectlytothetask,andoneormorebuttonstostartnewactions.

EnablingtheWorkflowtaskpane

Addingallowedactionstoforms

Addingallowedtaskstoforms

UsingtheOnClickeventtoaddactionandtaskbuttons

Page 20: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CreatinganHWSAdapterBecausetheWorkflowtaskpanedoesnotsubmitdatatotheHWSserviceautomatically,youmustcreateanHWSadaptertosubmittheform.

Thereisnodesignerinterfaceassociatedtothesubmitadapters.Toenabletheseadapters,modifytheformdefinitionfile(.xsf)toincludethehwsAdapterelementwithinthedataAdapterselement.

LikeotherInfoPathWebserviceadapters,theelementmustincludeanamefortheadapterandthelocationoftheWebServicesDescriptionLanguage(WSDL),andmustspecifywhethertheadapterallowssubmittingandquerying.BecausetheseadaptersareonlyusedtosubmitdatatoanHWSservice,thesubmitAllowedattributemustbesetto"yes".ThequeryAllowedattributecanbeomitted,whichcorrespondstoadefaultvalueof"no",oritcanbeincludedandsetto"no".

Aspartofthedesignofactionsandtasks,youcanspecifyadditionalparametersthatarespecifictoeachactionortask.BelowisanexampleofanadapterthatstartsaworkflowwithanApprovalaction.ThevaluetouseforthehwsOperationelementtypeis"addActionToNewActivityFlow".ThetypeIDattributeusestheactionTypeIDattributevalue,whichisaGUID.

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://.../HWSService.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID=”{guid}”serviceUrl="http://.../HWSService.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:foo/b:bar"dataObject=”Aux1”/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

ThehwsAdapterelementhasthesamedefaultinterfaceastheothersubmitadapterssupportedbyInfoPath,buttheHWSsubmitadaptersdonotappearintheinterface.Instead,toinvokeasubmitaction,youmust

Page 21: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

addittoyourcode,asshowninthefollowingexample:

XDocument.DataAdapters.Item("StartApproval").Submit();

Atruntime,whenthesubmitoperationisinvoked,abuttonwiththecaption,GetStatus,appearsontheWorkflowtaskpane.Thisbuttonallowstheusertorefreshthetaskpanesothatitshowsthecurrentworkflowinformation.

DefiningHWSsubmitoperationsforactions

DefiningHWSreceiveoperations

Page 22: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 23: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AboutprogrammingInfoPath

MicrosoftOfficeInfoPath2003providesdeveloperswitharichdevelopmentenvironmentforcustomizingforms.Formscanbecustomizedbywritingprogrammingcodetorespondtoformanddatavalidationevents,toaccessandmanipulateaform'sunderlyingXMLdocument,toimplementcustomdatasubmissionandmerges,andtoimplementaccesstoexternaldatasources.Customizingaformcanalsoinvolvealteringoneoftheformfilestosuitaspecificrequirement.

ItisimportanttounderstandafewkeyconceptsthatareinvolvedinprogramminganInfoPathform.TheseconceptsincludetheInfoPathprogrammingcomponents,programmaticanddeclarativeprogramming,theInfoPathprogramminglanguages,andtheInfoPathprogrammingenvironment.

InfoPathprogrammingcomponents

Programmaticanddeclarativedevelopment

InfoPathprogramminglanguagesandtheprogrammingenvironment

Page 24: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 25: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Aboutsecondarydatasources

MicrosoftOfficeInfoPath2003ServicePack1addstheabilitytoconnectmultipledatasourcestoaformsimultaneously.Usingmultipledatasourcesinyourformsallowsyoutobuildcomplexfunctionalitysuchaslookuplistsorofflinedatastores.

Page 26: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

MainandsecondarydatasourcesThemaindatasourcecorrespondstothegroupsandfieldscontainingthedatathatunderliestheformandissavedastheformfile.

Asecondarydatasourceisusedtostoredatafromadditionaldatasources.Wheneveranewdataconnectioniscreatedforretrievingdata—forexample,byusingtheAddbuttonoftheDataConnectionsdialogbox—theretrieveddataisnotstoredinthemaindatasourcebutinasecondarydatasource.Thesecondarydatasourcereceivesthedatafromanydataconnectionusedforquerying,whetheritisanXMLdocument,adatabase,aWebservice,oraSharePointlibraryorlist.

TheDataSourcetaskpanedisplaysthestructure(groupsandfields)ofeachdatasource,bothmainandsecondary,andisusedforbindinggroupsorfieldsinthedatasourcetocontrolsintheform.Whenauserfillsouttheform,thecontrolsdisplaythedatafromthedatasourceandallowittobeupdatedduringediting.

Page 27: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NewfeaturesforworkingwithsecondarydatasourcesThefollowingsectionsdescribethechangesmadetoworkingwithsecondarydatasourcesinInfoPathServicePack1.

TheDataConnectionsdialogbox

DataSourcetaskpane

Fieldsandgroups

Controlsavailableforbindingtosecondarydatasources

Page 28: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 29: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Aboutsecurityanddeployment

AdditionalsecurityfeaturesanddeploymentfunctionalityhavebeenaddedtoMicrosoftOfficeInfoPath2003inServicePack1.Supporthasbeenaddedtoallowformtemplatestobemovedfromonelocationtoanotherorsentasanattachmenttoane-mailmessage.Inaddition,supporthasbeenaddedtotheInfoPathdesignmodetofacilitatethecreationanddeploymentoffullytrustedforms.

Page 30: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Securitylevels

Formtemplatescanhaveoneofthreedifferentsecuritylevels,dependingonwheretheformislocated.Thesesecuritylevelsareasfollows:

Restricted

Domain

FullTrust

NoteAllformsgeneratedintheInfoPathdesignerhaveasecuritylevelassociatedwiththem.InfoPathwillattempttoopenformsattheirassociatedsecuritylevel.Ifthesecuritylevelassociatedwiththeformishigherthanthesecuritylevelthatcanbegrantedtoit,theformwillnotopen.

Formsaregrantedsecuritylevelsbasedonthelocationfromwhichtheformwasopened.Formoreinformation,seetheTrustlevelssection.

Page 31: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TrustlevelsThehighestleveloftrustgrantedtoaformtemplateisdeterminedbythe"cachedfrom"location(thatis,wheretheformiscachedfrom)andotherverificationcode,asdescribedinthefollowingtable.Theattributeslistedinthetable(forexample,HTTP,UNC,requireFullTrust)arecache-basedentriesthatareusedtodeterminetheleveloftrustgrantedtoaform.

TrustLevelGranted

TrustLevelGranted

TrustLevelGranted

HighestLevelofTrustGrantedFullTrust

ClientComputer(Sandboxed)

Intranet(Sandboxed)

file:LocationId=CachedFromLocation

X

file:LocationId<>CachedFromLocationornoLocationId(regardlessofwheretheformcamefrom)

CachedFromLocation:IntranetHTTPorHTTPS

X

CachedFromLocation:InternetHTTPorHTTPS

CachedFromLocation:UNC XInstalledTemplate(requireFullTrust="yes")

X

InstalledTemplate(requireFullTrust="no")

X

Templatewithtrustedpublishercertificate

X

ExtractedFormFiles X

AllformfilesopenedintheInfoPatheditorareboundbyasetofconditionsthatdeterminethesecuritylevelinwhichtheformwillopen

Page 32: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

andwhetheritwillopen.WhenanInfoPathformisopenedintheeditor,itwilleitherbeopenedwithanappropriatesecuritylevel,oritwillfailtoload.Ifaformrequestsahighersecuritylevelthanitcanbegranted(aformcanrequestaspecificsecuritylevelusingthetrustLevelorrequireFullTrustattribute),itwillnotbepermittedtoload.Otherwise,itwillbeloadedwiththesecuritylevelitrequests.Iftheformtemplateisnotpermittedtoopenwiththerequestedsecuritylevel,theuserwillnotbeabletoopentheformandwillreceivethe"InsufficientSecurityPrivilegeWarning"errormessage.

Thefollowingtabledescribestheconditionsrequiredforopeningaformateachsecuritylevelandtheresultantbehaviorwhentheuserattemptstoopentheform:

Formasksfor: Formasksfor:

EditorOpens/Fails

FullTrust(requireFullTrust="yes")

DomainTrust(trustLevel="Domain"orblank)

HighesttrustlevelInfoPathcangrantbasedonevidence

Trusted(installedortrustedcertificate)

EditoropensatFullTrustlevel

N/A

HighesttrustlevelInfoPathcangrantbasedonevidence

DomainTrust:ClientComputer

Failstoopen EditoropensatDomainlevel

Highesttrust

Failstoopen EditoropensatDomainlevel

Page 33: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

levelInfoPathcangrantbasedonevidence

DomainTrust:Intranet

HighesttrustlevelInfoPathcangrantbasedonevidence

DomainTrust:Internet

Failstoopen EditoropensatDomainlevel

HighesttrustlevelInfoPathcangrantbasedonevidence Restricted

Failstoopen Failstoopen

Specifyingasecuritylevel

Page 34: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Maildeploymentandmobileformtemplates

MicrosoftOfficeInfoPath2003ServicePack1allowsyoutosendyourformtemplatesasanattachmenttoane-mailmessageandtomovethemfromonelocationtoanother.Maildeploymentisaneasyandeffectivewaytodistributeformsforinterofficeuseaswellastodeployformstoremoteusers.

Understandingformidentity

Designingaformtosendasanattachmenttoane-mailmessage

Sharingformsbye-mailmessageorfromacommonsharedlocation

Compatibility

Page 35: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 36: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Abouttheformdefinitionfile

TheMicrosoftOfficeInfoPath2003formdefinition(.xsf)file,commonlyreferredtoasthe.xsffile,servesasthemanifestofanInfoPathform.The.xsffileisautomaticallycreatedbyInfoPathwhenanewformtemplateiscreatedandsavedindesignmode.Asformdesignersanddeveloperschangetheformtemplateoraddnewfeaturestoit,InfoPathupdatesthe.xsffiletoreflectthosechanges.

NoteThe.xsffilecanalsobemodifieddirectlybyusinganytextorXMLeditor,suchasMicrosoftNotepad.However,careshouldbetakenwhenmakingmodificationstothe.xsffile:ifaninvalidentryismade,theformthatthefileisassociatedwithmaybeleftinanunusablestate.However,somecustomizationscanbemadetothe.xsffilethatcannotbegeneratedindesignmode.

The.xsffileisthecorefileofanInfoPathformbecauseitcontainsinformationabouttheformasawhole.Someofthedataitcontainsincludesprocessingmetadata,userinterfacecustomizations,schemadefinitions,views,businesslogicdeclarations,eventhandlers,anddeploymentinformation.

Thefollowingaresomeoftheitemsthatthe.xsffilecontains:

Auniqueidentifierfortheform

Globalmetadatainformationabouttheform,includingdeploymentandpublishinginformation

TheXMLSchemadefinitionsfortheXMLdocumentthattheformproduces

Definitionofviewsandtheirassociateduserinterfacecomponents(menus,toolbars,andbuttons)

Definitionofeditingactionsthataremadeavailableusinguserinterfacecomponents,andhowtheiravailabilitywillbedeterminedcontextually

Workflowandroutinginformation

Eventhandlers,datavalidation,andbusinesslogicthatisassociatedwithindividualXMLnodesoftheform'sunderlyingXMLdocument,orwiththe

Page 37: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XMLdocumentitself

Eventhandlersassociatedwiththeformasawhole

Packaginginformationaboutallofthefilescontainedwithintheformtemplate

The.xsffileisbasedonthexsfnamespace.ItsrootelementisthexDocumentClasselement.

NoteAcompletereferencetothe.xsffile,includingallofitselements,attributes,andotherentities,canbefoundintheInfoPathXSFReferencethatispartoftheInfoPathDeveloper'sReference,availableintheInfoPathHelpsystemandtheMicrosoftScriptEditor(MSE)Helpsystem.

Page 38: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 39: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Abouttheprogrammingenvironment

MicrosoftOfficeInfoPath2003usestheMicrosoftScriptEditor(MSE)asitsprimaryintegrateddevelopmentenvironment.MicrosoftJScriptandMicrosoftVBScriptaretheprogramminglanguagesthatareusedinMSEtocreatecustombusinesslogicforaform.

MSEcanbeopenedwhenworkingwithaformindesignmodebypointingtoScriptontheToolsmenuandclickingMicrosoftScriptEditor,orbypressingALT+SHIFT+F11.WhenyouopenMSEfromInfoPath,theMSEcodeeditorappearsandtheform'sdefaultscriptingfile(witheithera.jsor.vbsextension,dependingonthescriptinglanguagesetfortheform)opensinthecodeeditingwindow.

WorkingwithMSEinanInfoPathforminvolvesseveraltasks,includingsettingthedefaultscriptinglanguage,creatinganeventhandler,anddebuggingscriptingcode.

Settingthedefaultscriptinglanguage

Creatinganeventhandler

Debuggingscriptingcode

NoteFormoreinformationaboutusingMSE,clickMicrosoftScriptEditorHelpontheHelpmenuwhenworkinginMSE.

Page 40: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AboutVisualStudio.NETintegration

MicrosoftOfficeInfoPath2003ServicePack1orlaterallowsyoutouseMicrosoftVisualStudio.NETtowritemanagedcodeinsteadofscriptforformcodeinnewInfoPathformtemplatesortoaddmanagedcodetoexistingformtemplates.TouseVisualStudio.NETtocreate,debug,andbuildInfoPathprojectsthatuseMicrosoftVisualC#orVisualBasic.NETmanagedcode,youmustdownloadtheMicrosoft®OfficeInfoPath™2003ToolkitforVisualStudio®.NETfromtheInfoPathDeveloperCenterontheMicrosoftDeveloperNetwork(MSDN)WebsiteandinstallitwithVisualStudio.NET2003.TheintegrationfeaturesprovidedbythetoolkitallowyoutouseacombinationofInfoPathforformdesignandVisualStudio.NETforwritinganddebuggingformcode.TheseintegrationfeaturesallowyoutotakeadvantageofsuchfeaturesoftheVisualStudio.NETdevelopmentenvironmentas:

Buildingyourprojectindebugorreleaseconfigurations.

UsingIntelliSensesupportintheCodeEditorsuchasstatementcompletion,memberslists,andinlineparameterinformation.

PressingF1intheCodeEditortodisplaycontext-sensitivehelpinformationabouttypes,members,andothercodekeywords.

UsingVisualStudio.NETdebuggingfeatures.

Additionally,usingmanagedcodeinInfoPathprojectsallowsyoutotakeadvantageofthefeaturesofthe.NETFrameworkcommonlanguageruntime(CLR)andtomakecallsintothecomprehensive,object-orientedcollectionofreusabletypesprovidedbythe.NETFrameworkclasslibrary.

FormoreinformationonusingVisualStudio.NETtocreateInfoPathprojects,seethedocumentationinstalledwiththeMicrosoftOfficeInfoPath2003ToolkitforVisualStudio.NET.

Page 41: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 42: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AboutXMLSchemaimprovements

ManyimprovementshavebeenmadeforXMLSchema(.xsd)supportinMicrosoftOfficeInfoPath2003ServicePack1.

NativesupportforthefollowingXMLSchemaconstructshavebeenaddedtoInfoPath:

Abstracttypes

Abstractelementsandsubstitutiongroups

Requiredwildcard(<any>)

Repeatingoroptionalmodelgroupsintheschema(sequence,choice,group,andallwithminOccursormaxOccursdifferentfrom1)

Inlineschemas

Page 43: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

InteractiveincrementalcreationofthedatasourceTosupportabstracttypesorelementsandrequiredwildcards,creationofthedatasourceisnowinteractive.Forexample,schemacreationisnotpossibleiftheschemadelegatespartofitssyntaxtootherschemas.Thiscanhappenwhenatypeoranelementisdefinedasabstractorwhenthecontentmodelofanelementcontainsan<any>.Whenoneoftheseconditionsoccurs,InfoPathwillprompttheusertospecifyaschemasourcethatcontainstheneededdatabeforeproceeding.Thisprocessisrepeateduntiltheschemacollectionthatisloadedcontainsenoughinformationtogenerateacompletedatasource.

Page 44: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

BettermodelgroupsupportModelgroupsspecifiedas"choice"or"sequence"andwithminOccursormaxOccursnotequalto1arenowshownintheDataSourcetaskpane.Theycanbeboundtocontrols,andtheycanbetreatedasagroupinthedatasource.

NoteModelgroupsdesignatedas"group"or"all"arenotdisplayedintheDataSourcetaskpane.

Page 45: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NativesupportforinlineschemasInlineschemasarenativelysupportedduringdesign.ThisfeatureallowsyoutouseanXMLdocumentthatcontainsitsownschemaasadatasource.

Page 46: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SupportfordatasourcechangeTheunderlyingdatastructureofaformcannowbechangedduringformcreation.ClickingConvertMainDataSourceontheToolsmenuallowsyoutoconvertthecurrentdatasourcewhileretainingtheinformationthatdependsonit.

Changingadatasourceisrestrictedtothefollowingpaths:

Convertingfromablankform,XMLSchema,orXMLfiletoanotherXMLSchemaorXMLfile.

ConvertingfromaWebserviceorotherdataconnectiontoanotherWebserviceordataconnection.

Onceyouspecifythenewdatasource,alldependentdatawillbemappedtothenewdatasource.Ifthedatacannotbemapped,controlswillappearunboundintheview.

NoteChangingthedatasourcedoesnotupdatethecodeassociatedwiththeform.Also,afterusingtheConvertMainDataSourcecommand,youcannotusetheUndocommandontheEditmenutoreverttotheoriginaldatasource.

Page 47: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RecursivetemplatesupportTheRepeatingRecursiveSectioncontroladdsrecursivestructuresofarbitrarydepthtoaform.

ThiscontrolisnowthedefaultcontrolwhenyoudragarecursivestructurefromtheDataSourcetaskpane.

Thepropertiesoftherecursivesectioncorrespondtothepropertiesofanordinarysection,withtheexceptionthatdigitalsignaturesarenotallowed.TheonlypropertythatcanbesetintheinternalrecursiveblockisthedefaultvalueoftheXMLfragmentforadditionalrecursivesectionsinsertedwithintheoutermostinstance.

Page 48: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 49: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AbouttheInfoPathobjectmodel

TheMicrosoftOfficeInfoPath2003objectmodelisaCOM-basedobjectmodelthatcanbeusedtointeractwithInfoPathformsandtheirunderlyingXMLdocuments.ItissimilartootherMicrosoftOfficeapplicationobjectmodelsinthatitimplementsinterfacesforcollections,objects,properties,methods,andevents.However,theInfoPathobjectmodelisprimarilyusedinscriptingcode,usingtheMicrosoftScriptEditor(MSE)thatisbuiltintoInfoPath.

NoteUnlikeotherOfficeapplicationsthatsupportcompleteapplicationautomation,theInfoPathobjectmodelsupportsautomationofonlycertainfeaturesoftherun-timeeditingenvironment.

ThefollowingsectionsdiscusstheInfoPathfunctionalareasthattheobjectmodelrepresents,thelocationsfromwhichtheobjectmodelcanbeaccessed,andthelevelsofobjectmodelsecurity.

Objectmodelfunctionalareas

Objectmodelaccess

Objectmodelsecurity

ViewingServicePack1objectmodelchangesfromtheObjectBrowser

Page 50: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 51: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Accessingapplicationdata

TheMicrosoftOfficeInfoPath2003objectmodelprovidesobjectsandcollectionsthatcanbeusedtogainaccesstoinformationabouttheInfoPathapplication,includinginformationrelatedtoaform'sunderlyingXMLdocumentandtheformdefinition(.xsf)file.Thisdataisaccessedthroughthetop-levelobjectintheInfoPathobjectmodelhierarchy—theApplicationobject.

UsingtheApplicationobject,InfoPathformdeveloperscanaccessinformationaboutthecurrentlyinstalledinstanceofInfoPath,includingitsnameandversionnumber.Inthefollowingexample,theNameandVersionpropertiesoftheApplicationobjectreturndatainamessageboxtotheuser:

Application.XDocuments(0).UI.Alert("Applicationname:"+Application.Name+"\nApplicationversion:"+Application.Version);

NotethattheAlertmethodoftheUIobject,whichisaccessedthroughtheXDocumentobject,isusedtodisplayamessageboxtotheuser.BecausetheXDocumentobjectthatrepresentsthecurrentlyopenform'sunderlyingXMLdocumentisembeddedintheInfoPathscriptengine,thepreviousexamplecanalsobewrittenasfollows:

XDocument.UI.Alert("Applicationname:"+Application.Name+"\nApplicationversion:"+Application.Version);

NoteThe\ncharacterreferencesinthetextforthealertmessageisastandardnewlinefeedthatcausesthetexttobreakandbeplacedonanewlineinthemessagebox.

Accessingdataaboutaform'sXMLdocument

Accessingdataaboutaform's.xsffile

Page 52: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 53: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Accessingexternaldatasources

WhenworkingwithaMicrosoftOfficeInfoPath2003form,youcanwritescriptingcodetoaccesstheform'ssecondarydatasources,whicharetypicallyexternaltotheprimarydatasourceofaform,andthenmanipulatethedatathattheycontain.TheInfoPathobjectmodelsupportsaccesstoaform'sexternaldatasourcesthroughtheuseoftheDataObjectobjectinassociationwiththeDataObjectscollection.

TheInfoPathobjectmodelalsoprovidesasetofdataadapterobjects,containinginformationaboutthesecondarydatasources,andaccesstothedatathattheycontain.ThetypeofdataadapterthatisreturnedbytheDataObjectobjectdependsonthetypeofdatasourcethatwasselectedwhenthesecondarydatasourcewascreatedindesignmode.

OverviewoftheDataObjectscollection

OverviewoftheDataObjectobject

Overviewofthedataadapterobjects

UsingtheDataObjectscollectionandtheDataObjectobject

Page 54: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 55: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Accessingformdata

WhenyouwanttoextendthefunctionalityofaMicrosoftOfficeInfoPath2003form,itisoftennecessarytoprogrammaticallyaccessinformationabouttheform'sunderlyingXMLdocument,accessthedatathattheXMLdocumentcontains,orperformsomeactionontheXMLdocument.TheInfoPathobjectmodelsupportsaccessandmanipulationofaform'sunderlyingXMLdocumentthroughtheuseoftheXDocumentobjectinassociationwiththeXDocumentscollection.

TheXDocumentobjectisoneofthemostusefulobjectswithintheInfoPathobjectmodelbecauseitprovidesavarietyofproperties,methods,andeventsthatnotonlyinteractwithaform'sunderlyingXMLdocument,butalsoperformmanyoftheactionsthatarewithintheInfoPathuserinterface.

OverviewoftheXDocumentscollection

OverviewoftheXDocumentobject

UsingtheXDocumentscollectionandtheXDocumentobject

Page 56: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 57: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AutomatingInfoPath

MicrosoftOfficeInfoPath2003ServicePack1offersexpandedapplicationautomationintheformofmethodsoftheApplicationobjectandtheXDocumentscollection.

OverviewoftheApplicationandXDocumentobjects

Forbackwardcompatibility,theautomationofInfoPathisaccomplishedbyusingtheExternalApplicationobjectfromaprogramminglanguageorenvironmentthatsupportstheComponentObjectModel(COM).

OverviewoftheExternalApplicationobject

UsingtheExternalApplicationobject

Page 58: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 59: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Displayingalertsanddialogboxes

WhenwritingprogrammingcodetoextendthefunctionalityofaMicrosoftOfficeInfoPath2003form,itisoftenusefultoprovidetheuserwithinformationinadialogbox.ProgrammaticallydisplayingadialogboxisaccomplishedinInfoPathbyusingtheUIobject.

OverviewoftheUIobject

UsingtheUIobject

Page 60: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 61: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Handlingerrors

Whencreatingcustomapplications,developersmustoftenperformerrorhandlingthatinvolveswritingprogrammingcodetocheckforerrorsraisedbytheapplicationortocreateandraisecustomerrors.TheMicrosoftOfficeInfoPath2003objectmodelsupportserrorhandlingthroughtheuseoftheErrorobjectinassociationwiththeErrorscollection.

InInfoPath,errorscanoccurwhenaform'sXMLSchemaisvalidated,whenacustomvalidationconstraintfails,whenanerrorisgeneratedbytheReportErrormethodoftheDataDOMEventobject,orwhenanerroriscreatedusingtheAddmethodoftheErrorscollection.

OverviewoftheErrorscollection

OverviewoftheErrorobject

UsingtheErrorscollectionandtheErrorobject

Page 62: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 63: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Respondingtoformevents

YoucanwritescriptingcodetorespondtovariouseventsthatcanoccurinMicrosoftOfficeInfoPath2003asauserfillsoutaform.InInfoPath,eventstaketheformofeventhandlersthatarecreatedwhenworkingwithaformindesignmode.

InfoPatheventhandlersmustbeinitiallycreatedindesignmodebecause,inadditiontothescriptingdeclarationsthatarecreatedinaform'sprimaryscriptingfile,entriesarealsomadeintheformdefinition(.xsf)file.Afteryouhavecreatedaneventhandler,youshouldnotalteritsdeclarationintheprimaryscriptingfile.

ForinformationaboutcreatingtheInfoPatheventhandlers,seeAbouttheprogrammingenvironment.

Overviewoftheeventobjects

Usingtheeventobjects

Page 64: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 65: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Workingwithformwindows

WhenworkingprogrammaticallywithaMicrosoftOfficeInfoPath2003form,youcanwritescriptingcodetoaccesstheform'swindows,andthencustomizesomeoftheitemsthattheycontain.TheInfoPathobjectmodelsupportsaccesstoaform'swindowsthroughtheuseoftheWindowobjectinassociationwiththeWindowscollection.

TherearetwotypesofwindowsinanInfoPathform:theeditingwindowthatisusedastheformareawhenauserfillsoutaform,andthedesigningwindowthatisusedasthedesignmodewhenauserdesignsaform.Whenwritingscriptingcodeinaform,itistheeditingwindowthatprovidesthemostusefulfunctionality,becauseyoucanusetheWindowobjectassociatedwithittoaccessavarietyofpropertiesandmethodsthatcanbeusedtocustomizeaform.

OverviewoftheWindowscollection

OverviewoftheWindowobject

UsingtheWindowscollectionandtheWindowobject

Page 66: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 67: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Workingwithviews

WhenworkingwithaMicrosoftOfficeInfoPath2003form,youcanwritescriptingcodetoaccesstheform'sviews,andthenperformavarietyofactionsonthedatathattheviewscontain.TheInfoPathobjectmodelsupportsaccesstoaform'sviewsthroughtheuseoftheViewobject.

OverviewoftheViewobject

UsingtheViewobject

Page 68: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 69: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Aboutthedevelopersampleforms

TheMicrosoftOfficeInfoPath2003developersampleformsareasetofformsdesignedtodemonstratevariousdevelopmenttechniquesforcustomizingandimplementingInfoPathfeatures.Thefollowingtablelistseachofthedevelopersampleformsandthefeaturesthattheyillustrate.

Name Filename DescriptionDataValidation

D_VALID.XSN Demonstratesthewaysinwhichdatacanbevalidatedinaform.Methodscoveredincludeschema-based,custom,andscript-basedvalidation.

Events EVENTS.XSN Demonstratestheeventsthatcanbeusedinaform.Eventscoveredincludeformevents,datavalidationevents,andcontrolevents.

StructuralEditing

CD_EDIT.XSN DemonstratesthewaysinwhichthesourceXMLdocumentofaformmaybeedited,andhowtheeditingactionsthatareavailabletoauserarebasedoncontext.Methodscoveredincludefieldandstructuralediting,withexamplesofeditingusingcontrolsandscriptingcode.

UserInterface

UIBASICS.XSNDemonstratesthewaysinwhichtheInfoPathuserinterfacecanbecustomizedinaform.Methodscoveredincludemenuitems,toolbars,customtaskpanes,andcustomdialogboxes.

Usingthedevelopersampleforms

Page 70: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 71: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AbouttheDataValidationdevelopersampleform

TheDataValidationdevelopersampleformdemonstratesthevarietyofwaysinwhichdatacanbevalidatedinMicrosoftOfficeInfoPath2003.Thissampleformisdividedintothreesections,eachdemonstratingoneofthethreemethodsofdatavalidation:schema-basedvalidation,customvalidation,andscript-basedvalidation.

Totestthefeaturesofthesampleform,simplychooseanyfieldandenterdatathatdoesnotcomplywiththevalidationconstraintthatisassociatedwithit.Thevalidationconstraintscanbeviewedbyrestingthemousepointeroverthequestionmarkiconnexttoeachfield.Whenyoumovethecursoroutofthefield,youreceiveoneoftwopossibleerrorindications:aninlinealertoradialogboxalert.

NoteToseeallofthefilesthatmakeuptheDataValidationdevelopersampleform,opentheformandclickExtractFormFilesontheFilemenuwhileindesignmode.Thisextractsalloftheformfilesfromtheformtemplatefileandsavesthemtoaspecifiedfolderonyourharddisk.

TolearnhoweachofthedatavalidationmethodsisimplementedintheDataValidationdevelopersampleform,seethefollowingtopics:

Schema-basedvalidationintheDataValidationdevelopersampleform

CustomvalidationintheDataValidationdevelopersampleform

Script-basedvalidationintheDataValidationdevelopersampleform

Page 72: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 73: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Schema-basedvalidationintheDataValidationdevelopersampleform

Schema-baseddatavalidationinMicrosoftOfficeInfoPath2003isdeterminedbytheXMLSchemaassociatedwithaform.Schema-basedvalidationoccursbydefaultwheneverauserfillsoutaform.Aftertheuserentersdataintoafieldandmovesoutofthatfield,thedataisimmediatelycheckedagainsttheXMLSchema.

IntheDataValidationdevelopersampleform,schema-basedvalidationisusedtoverifythatanumberfallswithinacertainrange,verifythetypeofdatainafield,verifythatafieldcontainsdata,andlimitthenumberofrowsthatcanbeaddedtoatable.

NoteInfoPathsupportsthecreationofonlydatatypeandrequiredfieldconstraintsinXMLSchemasindesignmode.However,theuseofotherkindsofconstraintsintheschemaissupported.Tocreateotherkindsofschema-basedvalidation,youmustedityourXMLSchemafilesusingMicrosoftNotepadorsomeothertexteditor.

Rangecheckinganddata-typevalidationintheschema

Requiredfieldsintheschema

Structuralvalidationintheschema

Page 74: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 75: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CustomvalidationintheDataValidationdevelopersampleform

Custom(ordeclarative)validationinMicrosoftOfficeInfoPath2003isusedtocheckforrequiredfields,verifyarangeofvalues,andensuretheaccuracyofafield.YoucanusetheDataValidationdialogboxtocreatecomplexvalidationconstraintsthatperformcalculationsandvalidatethedatainotherfields.Validationerrorscanbedisplayedasinlinealertsordialogboxalerts.Ineithercase,youcanwriteerrormessagesthattelltheuserhowtofixtheinvalidentry.Aswithschema-basedvalidation,customvalidationconstraintsareattachedtofieldsintheform,andthevalidationisinvokedwhenauserchangesthedatainafield.

NoteTheDataValidationdialogboxisavailableviathePropertiesdialogboxforeachoftheOfficeInfoPath2003controls.

WhenyoucreateacustomdatavalidationconstraintintheDataValidationdialogbox,OfficeInfoPath2003createsanerrorConditionelementwithinthecustomValidationsectionoftheformdefinition(.xsf)file.Thefollowingisanexampleofthevalidationconstraintscreatedinthe.xsffileforthecostfieldintheDataValidationdevelopersampleform:

<xsf:customValidation><xsf:errorConditionmatch="/sampleData/travelExpenses/expense/cost"expressionContext="."expression=".&lt;0or.&gt;500"><xsf:errorMessagetype="modeless"shortMessage="Thecostoftheitemmustbemorethan$0.00andcannotgoover$500.00.">Thecostoftheitemmustbemorethan$0.00andcannotgoover$500.00.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

Page 76: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ThematchattributeoftheerrorConditionelementspecifiestheXPathexpressionthatisusedtobindthecustomdatavalidationconstrainttothefield,andtheexpressionattributeisusedtospecifytheconstraint.

TheerrorMessageelementisnestedwithintheerrorConditionelementandisusedtospecifytheerrormessagethatappearswhenthevalueoftheassociatedfieldviolatestheconstraint.TheshortMessageattributeequatestotheScreenTipfieldintheDataValidationdialogbox,andthevalueoftheerrorMessageelementequatestotheMessagefieldintheDataValidationdialogbox.Thetypeattributeisusedtospecifyerrortype.

Page 77: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 78: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Script-basedvalidationintheDataValidationdevelopersampleform

Script-basedvalidationisspecifiedinthebusinesslogicscriptfileassociatedwithaMicrosoftOfficeInfoPath2003form,anditprovidesmoreflexibilitythancustomvalidationorschema-basedvalidation.Usingscript-basedvalidation,youcanspecifywhenafieldshouldbevalidated(forexample,whentheuserfirsttypesdataintoafield,aftertheuserleavesafield,orafterdataisvalidatedbytheschema).Youcanalsowritescriptthatrunswhenaformisopenedorwhentheuserswitchesviews.Thescriptyouwritecanperformavarietyoffunctions,includingcomparingfields,calculatingvalues,showingerrormessages,updatingvalues,andrevisingotherfields.

NoteInfoPathsupportswritingscriptinMicrosoftVBScriptandMicrosoftJScript.However,youcannotmixthescriptinglanguagesusedwithinasingleform.

Tocreatescript-baseddatavalidation,youuseInfoPathdesignmodetocreateaneventhandler(alsocalledaneventfunction),andthenyouwritescriptingcodefortheeventhandlerusingtheMicrosoftScriptEditor(MSE).Foreacheventhandlerthatyoucreate,InfoPathplacesanentryintheformdefinition(.xsf)filethatcontainsthenameoftheeventhandlerandtheXMLDocumentObjectModel(DOM)nodethattheeventhandlerisassociatedwith.

Becausetheeventhandlerisreferencedinthe.xsffile,youcannotcreateaneweventhandlerentirelyfromwithinMSE—youmustinitiallycreatetheeventhandlerinInfoPathdesignmode.SinceInfoPathisusedtocreatethedeclarationoftheeventhandler,youcannotmodifytheeventhandlernameoritsargumentsonceithasbeencreated.

Eventhandlersintheformdefinitionfile

Script-basedeventhandlersandfunctions

UsingtheDataDOMEventobject

Page 79: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 80: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AbouttheEventsdevelopersampleform

TheEventsdevelopersampleformdemonstratessomeoftheeventsthatmaybeusedinaMicrosoftOfficeInfoPath2003form.InInfoPath,eventsareusedtoimplementclient-sidebusinesslogic,whichmayincludedatavalidation,controllingthebehaviorofaform,respondingtotheactionsofcontrolsonaform,orsubmittingaform.

TheEventsdevelopersampleformisbasedonthescenarioofacustomercontactsystem.Itcontainsthreeviewsthatareusedtomanagecustomerinformation:

NewCustomerViewUsedtoenternewcustomerinformation.Customerinformationmustbeenteredinthisviewbeforetheotherviewscanbeused.

ContactCustomerViewUsedtosetthedatesonwhichthecustomershouldbecontactedandtorecordthatthecustomerhasbeencontacted.

ArchiveCustomerViewUsedtoshowcustomerinformation,recordnotesaboutthecustomer,andrecordthatthecustomerrecordhasbeenarchived.

Totestthefeaturesofthesampleform,entercustomerinformationinNewCustomerview,andthenclickSwitchToContactCustomerViewtoswitchviews.AfterenteringcustomercontactinformationinContactCustomerview,youcanclickSwitchToArchiveCustomerViewtoswitchtothelistofarchivedcustomercontactinformation.

NoteToseeallofthefilesthatmakeuptheEventsdevelopersampleform,opentheformandclickExtractFormFilesontheFilemenuwhileindesignmode.Thisextractsalloftheformfilesfromtheformtemplatefileandsavesthemtoaspecifiedfolderonyourharddisk.

TolearnhoweacheventisimplementedintheEventsdevelopersampleform,seethefollowingtopics:

FormeventsintheEventsdevelopersampleform

DatavalidationeventsintheEventsdevelopersampleform

ControleventsintheEventsdevelopersampleform

Page 81: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 82: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

FormeventsintheEventsdevelopersampleform

TheEventsdevelopersampleformimplementsavarietyofMicrosoftOfficeInfoPath2003formeventsthatcanbeusedtorespondtospecificactivitiesthatoccurwhenaformisopenedandwhileitisbeingfilledout.Formeventscanoccurwhenaform'sversionnumberisvalidated,whenaformisopened,whenaformviewischanged,andafteraformhasbeenmergedwithanotherform.

ThefollowingtablelistseachoftheformeventsimplementedintheEventsdevelopersampleform,alongwithadescriptionofhowtheyareused.

Event DescriptionOnVersionUpgradeUsedtoverifythattheversionnumberoftheform

beingopenedmatchestheversionnumberoftheformwhenitwasoriginallydesigned.Iftheversionnumbersdonotmatch,thiseventoccursandscriptingcodecanbeusedtoupdatetheformordisplayanerrormessage.

OnLoad Usedtoinitializetheformasitisbeingopened.Whenthiseventoccurs,scriptingcodecanbeusedtosettheappropriateviewbasedondatacontainedintheform.

OnSwitchView Usedwhenchangingfromoneviewtoanother.Thiseventoccurswhenauserchangesviews,andscriptingcodecanbeusedtoinsertdataintotheform.

OnAfterImport Usedtoprovideadditionalprocessingafteraformhasbeenmergedwithanotherform.Thiseventoccursafterdataisimportedfromanotherform,andscriptingcodecanbeusedtosettheappropriateviewbasedonthemergeddatacontainedintheform.

NoteTheOnSubmitRequesteventisalsoaformevent,butitwasnotusedintheEventsdevelopersampleform.

Page 83: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheOnVersionUpgradeevent

UsingtheOnLoadevent

UsingtheOnSwitchViewevent

UsingtheOnAfterImportevent

Page 84: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 85: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DatavalidationeventsintheEventsdevelopersampleform

TheEventsdevelopersampleformimplementsavarietyofMicrosoftOfficeInfoPath2003datavalidationeventsthatcanbeusedtovalidatedatathatisenteredintoaform.Datavalidationeventscanoccurafterachangehasbeenmadetoafieldorgroup,afterachangehasbeenmadetoafieldorgroupbutbeforethedataiscommitted,andafterachangehasbeenmadetoafieldorgroupandafterthedataiscommitted.

Touseoneofthedatavalidationevents,youmustfirstcreatetheeventintheFieldorGroupPropertiesdialogboxthatisavailablefromtheDataSourcetaskpane.Toaccessthisdialogbox,right-clickoneofthefieldsorgroupsinthetaskpane,andthenclickProperties.OntheValidationandScripttab,selecttheeventyouwishtocreate,andthenclickEdit;thisopensMicrosoftScriptEditor(MSE)anddisplaystheInfoPath-generatedeventhandler.

NoteEventhandlersinInfoPathmustbecreatedindesignmode.

ThefollowingtablelistseachofthedatavalidationeventsimplementedintheEventsdevelopersampleform,alongwithadescriptionofhowtheyareused.

Event DescriptionOnValidate Usedtovalidatethedatacontainedinthe

ContactDatesgroup.Whenthiseventoccurs,scriptingcodeisusedtoverifythatthedatesusedarewithinaspecifiedrange.

OnBeforeChange UsedtovalidatethedatacontainedintheEmailCampaignStart,PhoneContactStart,andRepresentativeVisitdatefields.Whenthiseventoccurs,scriptingcodeisusedtoimplementbusinesslogicthatchecksfortheexistenceofcertaindatesbeforeotherscanbeenteredorremoved.

OnAfterChange UsedtocallafunctionthatcalculatesthetotalcampaigncostsandupdatestheCampaignCost

Page 86: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

field.

UsingtheOnValidateevent

UsingtheOnBeforeChangeevent

UsingtheOnAfterChangeevent

Page 87: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 88: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ControleventsintheEventsdevelopersampleform

TheEventsdevelopersampleformimplementsasingleMicrosoftOfficeInfoPath2003controleventthatcanrespondtoabuttonclick;thisistheOnClickevent.TheOnClickeventoccursafterauserclicksabuttononaform.

NoteTheOnClickeventistheonlycontroleventsupportedbyInfoPath.

TousetheOnClickevent,youmustfirstcreatetheeventintheButtonPropertiesdialogboxthatisavailableontheshortcutmenuforthebuttoncontrol.OntheGeneraltab,setScriptastheAction,andthenclickMicrosoftScriptEditor.ThiswillopenMicrosoftScriptEditor(MSE)anddisplaytheInfoPath-generatedeventhandler.

NoteEventhandlersinInfoPathmustbecreatedindesignmode.

IntheEventsdevelopersampleform,theOnClickeventisimplementedforthethreebuttonsthatareusedtoswitchbetweenviews.ThefollowingexamplefromtheEventsdevelopersampleformshowstheOnClickeventhandlerfortheSwitchtoNewCustomerViewbutton:

functionbtnSwitchNew::OnClick(eventObj){XDocument.View.SwitchView("NewCustomer")}

NoteThenameofthebuttonusedintheeventhandlerdeclarationisdeterminedbythevaluesetfortheScriptIDboxintheButtonPropertiesdialogbox.

Page 89: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 90: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AbouttheStructuralEditingdevelopersampleform

TheStructuralEditingdevelopersampleformdemonstratessomeofthewaysinwhichtheunderlyingXMLdocumentofaMicrosoftOfficeInfoPath2003formmaybeeditedusingacombinationofcontrols,menuitems,toolbarbuttons,andscript.WhenfillingoutaforminInfoPath,usersareessentiallyeditinganXMLdocumentinaneasy-to-use,graphicalformat.AlthoughtheStructuralEditingdevelopersampleformisprimarilyintendedtodemonstratestructuralediting,itisusedtoillustratetwotypesofeditingthatcanoccurinaform:

FieldeditingEditingthatmodifiesthetextinafield(anelementorattributeintheform'sunderlyingXMLdocument).Forexample,enteringdatadirectlyintoatextboxcontrolchangestheunderlyingdataintheelementorattributethatthecontrolisboundto.

StructuraleditingEditingthatchangesthestructureoftheform'sunderlyingXMLdocument.StructuraleditingallowsfragmentsofXML(elementsandtheirassociatedchildelements,attributes,andcontent)tobeinserted,removed,orreplacedinasingleoperation.Forexample,addingitemstoarepeatingsection,repeatingtable,orlistcontrolcreatesnewelementsandattributeswithinthepartoftheXMLdocumentthatthecontrolisboundto.

BothfieldeditingandstructuraleditingareusuallyimplementedbyusingcontrolsthatconnectaformtoanunderlyingXMLdocument,allowinguserstoenterormodifythedatathattheXMLdocumentcontains.However,youmayalsoimplementfieldorstructuraleditingbyusingscriptingcodeinconjunctionwiththeInfoPathobjectmodel.

Inadditiontofieldandstructuralediting,InfoPathprovidestheconceptofeditingcontext,whichmeansthateditingactionscanbedependentonthecurrentselectionorinsertionpoint.Forexample,theAddPartBeforeCurrentbuttononthePartToolbarcustomtoolbaroftheStructuralEditingdevelopersampleforminsertsanewrowinthePartstableatapositionbasedonthecurrentcontext.Thebuttonisenabledonlyifthecurrentselectionisonorwithinoneoftherowsinthetable.

Totestthefeaturesofthesampleform,simplytypedatadirectlyintothefieldsontheform,orusetheInsertmenu,thePartCatalogcustomtask

Page 91: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

pane,theshortcutmenu,orthePartToolbarcustomtoolbartoinsertorremoverowsinthePartstable.

NoteToseeallofthefilesthatmakeuptheStructuralEditingdevelopersampleform,opentheformandclickExtractFormFilesontheFilemenuwhileindesignmode.Thisextractsalloftheformfilesfromtheformtemplatefileandsavesthemtoaspecifiedfolderonyourharddisk.

TolearnhoweditingfeaturesareimplementedintheStructuralEditingdevelopersampleform,seethefollowingtopics:

FieldeditingintheStructuralEditingdevelopersampleform

StructuraleditingintheStructuralEditingdevelopersampleform

EditingcontextintheStructuralEditingdevelopersampleform

Page 92: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 93: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

FieldeditingintheStructuralEditingdevelopersampleform

FieldeditinginaMicrosoftOfficeInfoPath2003formoccurswhendataisentereddirectlyintoaformfield(usuallyatextboxcontrol)asauserfillsoutaform.ThedatathatisenteredisstoredasavalueoftheelementorattributeoftheXMLfield(elementorattribute)intheunderlyingXMLdocumentthatthecontrolisboundto.Forexample,intheStructuralEditingdevelopersampleform,textboxesareusedforeditingthedatacontainedinthePartNumber,Description,Quantity,andUnitPricefields.

Fieldeditingusuallyoccurswhenauserentersdatawithinacontrolonaform;thedatathattheuserentersisstoredintheform'sunderlyingXMLdocument.However,youcanalsousescriptingcodetomanipulatethedatacontainedintheform'sunderlyingXMLdocumentbymodifyingtheXMLdocumentitself.Iftheformincludesacontrolsuchasatextboxthatisboundtothemodifieddata,thedatadisplayedintheformwillbeupdatedautomatically.

Usingcontrolsforfieldediting

Usingscriptforfieldediting

Page 94: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 95: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

StructuraleditingintheStructuralEditingdevelopersampleform

StructuraleditinginaMicrosoftOfficeInfoPath2003formoccurswhenauserisfillingoutaform,andthetypeofeditingactionsthattheuserperformsresultsinastructuralchangetotheform'sunderlyingXMLdocument.StructuralchangesinvolveinsertingorremovingelementsandattributesintheunderlyingXMLdocumentthattheformisboundto.Forexample,intheStructuralEditingdevelopersampleform,structuralchangesaremadewhenauserinsertsorremovesitemsfromthePartstableortheNotesbulletedlist.

StructuraleditingcontrolshavepredeterminededitingactionsthatcanbeassociatedwithtoolbarbuttonsandmenuitemsinInfoPathuserinterfaceareas.TheCommandsdialogboxthatisavailablefromastructuraleditingcontrol'sPropertiesdialogboxallowsyoutochoosewhicheditingactionsofthecontrolareavailabletousers,whichuserinterfaceareatheyappearin,andthelabelsthatareusedfortheassociatedbuttonormenuitems.Thestructuraleditingcontrolsusedinthissampleformincludearepeatingtableandabulletedlist.

StructuraleditingcanbeimplementedbyusinganInfoPathstructuraleditingcontrol,orbyusingscriptingcodetodirectlymanipulatethedatacontainedintheform'sunderlyingXMLdocument.Iftheformincludesacontrolsuchasarepeatingsectionthatisboundtothemodified(insertedordeleted)data,thedatadisplayedintheformwillbeupdatedautomatically.

Usingcontrolsforstructuralediting

Usingscriptforstructuralediting

Page 96: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 97: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

EditingcontextintheStructuralEditingdevelopersampleform

EditingcontextinaMicrosoftOfficeInfoPath2003formisthedependenceofeditingactionsonthecurrentselectionorinsertionpoint.Forexample,ifarowintheStructuralEditingdevelopersampleformPartstableisselected,thebuttonsforaddingorremovingpartsonthePartToolbarcustomtoolbarareenabledandwillinsertorremoverowsinthePartstableatapositionbasedonthecurrentcontext.Ifcurrentselectionisnotonorwithinoneoftherowsinthetable,thebuttonsaredisabled.

NoteThePartToolbarcustomtoolbarwascreatedbymodifyingthedefaultFormtoolbar.

ThefollowingaresomeoftheareasintheInfoPathuserinterfaceinwhicheditingcontextisapplicable:

InsertmenuMenuitemsavailableontheInsertmenu.Thesetypicallyincludemenuitemsforinsertingitemsinatableorsection.

ShortcutmenuMenuitemsavailableontheshortcutmenu.Thesetypicallyincludemenuitemsforinsertingorremovingitemsinatable,section,orlist.

TablemenuMenuitemsavailableontheTablemenu.Thesetypicallyincludemenuitemsforinsertingorremovingitemsinatable.

CustomtoolbarButtonsandmenuitemsavailableonacustomtoolbar.Thesetypicallyincludebuttonsormenuitemsforinsertingorremovingitemsinatableorsection,orbuttonsthatcallscriptingcode.

IntheStructuralEditingdevelopersampleform,arepeatingtablecontrolisusedtoimplementatablethatallowsuserstoeditalistofpartsinaninvoice.WhenauserchoosestoeditthetableusingtheInsertmenu,thePartToolbarcustomtoolbar,ortheshortcutmenu,InfoPathdeterminesthecontrolbeingused,andbasedontheeditingactionssetindesignmodeforthatcontrol,performstheappropriateeditingofthesourceXMLdocument.

Thestructuraleditingcontrolshavepredeterminededitingactionsthat

Page 98: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

canbeassociatedwithtoolbarbuttonsandmenuitemsinInfoPathuserinterfaceareas.TheCommandsdialogboxthatisavailablefromastructuraleditingcontrol'sPropertiesdialogboxallowsyoutochoosewhicheditingactionsofthecontrolareavailabletousers,whichuserinterfaceareatheyappearin,andthelabelsthatareusedfortheassociatedbuttonsormenuitems.InthePartstableoftheStructuralEditingdevelopersampleform,thefollowingeditingactionsareenabled:

InsertEnabledontheInsertmenu.AllowsausertoinsertanewrowinthePartstable.

InsertAboveEnabledontheshortcutmenuandthePartToolbarcustomtoolbar.AllowsausertoinsertanewrowinthePartstablethatisabovethecurrentlyselectedrow.

InsertBelowEnabledontheshortcutmenuandthePartToolbarcustomtoolbar.AllowsausertoinsertanewrowinthePartstablethatisbelowthecurrentlyselectedrow.

RemoveEnabledontheshortcutmenuandthePartToolbarcustomtoolbar.Allowsausertoremovethecurrentlyselectedrow.

NoteOthereditingactionscanbeusedinarepeatingtablecontrolthatarenotimplementedintheStructuralEditingdevelopersampleform.

Page 99: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 100: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AbouttheUserInterfacedevelopersampleform

TheUserInterfacedevelopersampleformdemonstratesthevarietyofwaysinwhichtheuserinterfacecanbecustomizedinaMicrosoftOfficeInfoPath2003form.Theuserinterfacefeaturescustomizedinthissampleformincludemenuitemsonthemenubar,shortcutmenus,toolbarbuttonsontheFormtoolbar,andacustomtaskpane.

Totestthefeaturesofthesampleform,simplyadd,modify,orremoveCDsbyusingtheInsertmenu,theCDCollectionToolbar,ortheshortcutmenubuttonswhilefillingouttheform.YoucanswitchbetweenCDCollectionandAllTracksviewsbyusingtheViewmenuorthecustomtaskpane.

NoteToseeallofthefilesthatmakeuptheUserInterfacedevelopersampleform,opentheformandclickExtractFormFilesontheFilemenuwhileindesignmode.Thisextractsalloftheformfilesfromtheformtemplatefileandsavesthemtoaspecifiedfolderonyourharddisk.

TolearnhoweachoftheuserinterfacefeaturesisimplementedintheUserInterfacedevelopersampleform,seethefollowingtopics:

CustommenusintheUserInterfacedevelopersampleform

CustomtoolbarsintheUserInterfacedevelopersampleform

CustomtaskpanesintheUserInterfacedevelopersampleform

Page 101: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 102: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CustommenusintheUserInterfacedevelopersampleform

MicrosoftOfficeInfoPath2003providestheabilitytocontrolwhereandhowyouwantmenuitemstoappearwithintheuserinterface,primarilybyenablingordisablingthemonvariousbuilt-inmenususedwithaform.SomeofthemenusthatyoucancustomizeincludeView,Insert,andTable,aswellasshortcutmenusthataredisplayedwhenauserclickstheshortcutmenubuttonassociatedwithacertainrepeatingtable,repeatingsection,oroptionalsection.Menuscanbecustomizedforrepeatingtables,repeatingsections,optionalsections,andviews.

NoteManyoftheotherstandardInfoPathmenuscanalsobecustomized;theUserInterfacedevelopersampleformdemonstrateshowtocustomizeaselectfew.

SeveralcustommenusareimplementedintheUserInterfacedevelopersampleform.Thefollowingtableliststheviews,tables,andsectionsoftheUserInterfacedevelopersampleform,alongwiththecustommenuitemsthatwereimplementedforeachofthem.

Name Type CustommenuitemsCDCollection

View CDCollectionmenuitemontheViewmenu.

AllTracks View AllTracksmenuitemontheViewmenu.CD Repeating

sectionCDmenuitemontheSectionsubmenuoftheInsertmenu.

InsertCDabove,InsertCDbelow,andRemoveCDmenuitemsontheshortcutmenufortheCDtable.

Track Repeatingtable

TrackmenuitemontheSectionsubmenuoftheInsertmenu.

InsertTrackmenuitemontheshortcutmenufortheCDtable.

InsertTracksandRemoveTracksmenuitemson

Page 103: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

theTablemenu.

InsertTrackabove,InsertTrackbelow,andRemoveTrackmenuitemsontheshortcutmenufortheTracktable.

Label Optionalsection

LabelmenuitemontheSectionsubmenuoftheInsertmenu.

InsertLabelmenuitemontheshortcutmenufortheCDtable.

RemoveLabelmenuitemontheshortcutmenufortheLabelcontrol.

NoteWhenyoucustomizemenusinInfoPath,thosecustomizationsareappliedattheviewlevel.Thismeansthatthecustomizationsyoumakearenotgloballyappliedtoallviews.Toapplythesamecustommenustomorethanoneview,youmustmakethemenucustomizationsineachview.

CustomizingtheViewmenu

CustomizingtheInsertmenu

CustomizingtheTablemenu

Customizingshortcutmenus

Page 104: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 105: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CustomtoolbarsintheUserInterfacedevelopersampleform

TheUserInterfacedevelopersampleformimplementsasinglecustomtoolbar,theCDCollectionToolbar,thatallowsuserstoaddorremoveaCD,Track,orLabel.Bydefault,MicrosoftOfficeInfoPath2003hasonebuilt-incustomtoolbar,theFormtoolbar,thatcanbeusedtocreatecustommenuitemsthatuserscanclicktoperformvariousactionsonaform.

TocustomizetheFormtoolbarindesignmode,youusethePropertiesdialogboxfortheparticularrepeatingsection,repeatingtable,oroptionalsectionthatyouareworkingwith.ThePropertiesdialogboxisaccessedbyright-clickingthesectionortableandclickingthePropertiesmenuitemontheshortcutmenu.InthePropertiesdialogboxforrepeatingtablesandoptionalsections,youclickCustomizeCommandstoopentheCommandsdialogbox.Forrepeatingsections,theCustomizeCommandbuttonisavailableintheSectionPropertiesdialogboxthatopenswhenyouchoosetomodifythedefaultsettingsofasection.TheCommandsdialogboxallowsyoutoassociatecertaineditingactionswithvariouscommandlocationsavailableonthemenusandtoolbarsinanInfoPathform.Tocreateacustomtoolbar,youselecttheFormToolbarlocation.

NoteIntheUserInterfacedevelopersampleform,thecommandlocationistheCDCollectionToolbar,sincethedefaultnameoftheFormtoolbarwasmodified.Modificationstothedefaultnameofatoolbarcanbemademanuallyintheformdefinition(.xsf)filebychangingthevalueofthecaptionattributeofthetoolbarelement.

Whenyoucustomizeatoolbar,InfoPathcreatesentriesinthe.xsffileusingbuttonelementswithinthetoolbarelement.Thecaptionthatappearsasthenameofthetoolbarisdeterminedbythecaptionattributeofthetoolbarelement,andthecaptionthatappearsasthenameofabuttononthetoolbarisdeterminedbythecaptionattributeofabuttonelement.

AsyouassociateeditingactionswiththecustomtoolbarusingtheCommandsdialogbox,menuitemsareplaceddirectlyonthetoolbar.

Page 106: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

However,itispossibletocreatemenusonthetoolbarandthenaddmenuitemstothosemenus.Thisisaccomplishedbynestingthebuttonelementsofthetoolbarwithinamenuelementinthe.xsffile.

Thefollowingisasectionfromthe.xsffileoftheUserInterfacedevelopersampleformthatcontainsthetoolbarelement.Notetheuseofthemenuelementtocreateamenuonthetoolbar.

<xsf:toolbarcaption="CDCollectionToolbar"name="CDCollectionToolbar"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="NewCD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="NewTrack"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="NewLabel"showIf="always"></xsf:button><xsf:menucaption="Remove"><xsf:buttonaction="xCollection::remove"xmlToEdit="CD_10"caption="CD"

Page 107: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

showIf="always"></xsf:button><xsf:buttonaction="xCollection::remove"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::remove"xmlToEdit="Label_16"caption="Label"showIf="always"></xsf:button></xsf:menu></xsf:toolbar>

Notes

Addingmenustoatoolbarisafeatureofthe.xsffileandisnotavailablewhenusingtheCommandsdialogboxindesignmode.

WhileInfoPathimplementsasinglecustomtoolbar,youcanaddmultipletoolbarstoaformbycreatingadditionaltoolbarelementswithinthe.xsffile.Onceyouhavecreatedtheadditionaltoolbarsbymanuallyeditingthe.xsffile,thosetoolbarsareavailableintheCommandsdialogbox,andyoucanthenassociateeditingactionswiththem.

Page 108: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 109: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CustomtaskpanesintheUserInterfacedevelopersampleform

TheUserInterfacedevelopersampleformimplementsacustomtaskpanethatisusedtoswitchviewsandperformothergeneral-purposeoperations,suchassortingthelistofCDs.Customtaskpanesare.htmlfilesthataredisplayedintheMicrosoftOfficeInfoPath2003taskpaneasauserfillsoutaform.Therecanbeonlyonecustomtaskpaneassociatedwithaform.

Tocreateacustomtaskpane,youmustfirstcreatean.htmlfilebyusinganHTMLeditorsuchasMicrosoftFrontPage.Youassociatethis.htmlfilewithaformbyusingtheAdvancedtabintheFormOptionsdialogboxthatisavailableontheToolsmenuindesignmode.TheAdvancedtaballowsyoutoaddthe.htmlfileandanyothersupportingfiles,suchasacascadingstylesheet(.cssfile),usingtheResourceManager.(TheResourceManagercanalsobeaccessedbyclickingResourceManagerontheToolsmenuindesignmode.)Afterthe.htmlfilehasbeenaddedasaresource,youcanselecttheEnablecustomtaskpanecheckboxandsetthenameandlocationofyourcustomtaskpane.

NoteYoumustaddthe.htmlfiletotheformusingtheResourceManagerbeforeyoucanmakethefileacustomtaskpane.

Whenyouaddacustomtaskpanetoaform,InfoPathcreatesentriesintheformdefinition(.xsf)fileusingthetaskpaneelement.Thecaptionattributeofthetaskpaneelementisusedtostorethenameofthecustomtaskpane,whilethehrefattributeisusedtostorethe.htmlfilename.Thefollowingisasectionfromthe.xsffileoftheUserInterfacedevelopersampleformthatcontainsthetaskpaneelement:

<xsf:taskpanecaption="CustomTaskPane"href="taskpane.htm"></xsf:taskpane>

InadditiontousingstandardHTMLmarkup,youcanalsousescriptingcodewithinthetaskpanethatcallstheInfoPathobjectmodel.Inthe

Page 110: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UserInterfacedevelopersampleform,theExtensionpropertyoftheXDocumentobjectisusedtogainaccesstothebusinesslogicfunctionscontainedintheform'sprimaryscriptfile.

Thefollowingisasectionfromthe.htmlfileusedasthecustomtaskpaneintheUserInterfacedevelopersampleform.ThecalltotheInfoPathobjectmodel'sExtensionpropertyisusedintheonClickeventfortheSortCDshyperlink.Whentheuserclicksthislink,theSortfunctionwithintheform'sprimaryscriptfileiscalled.TheSortfunctionthentakesthesourceXMLdocumentfortheformandsortsthecollectionofCDsalphabeticallyaccordingtoartistandtrack.

<divclass="action"><ahref=""onClick="gobjXDocument.Extension.Sort();returnfalse;">SortCDsbyartist/title</a></div>

NoteToviewthebusinesslogicfunctionsfortheUserInterfacedevelopersampleform,youcanopenMicrosoftScriptEditor(MSE)inInfoPathdesignmodebyclickingtheToolsmenu,pointingtoScript,andclickingMicrosoftScriptEditor,orbypressingALT+SHIFT+F11.

Page 111: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

InfoPathObjectModelDiagram

Application ActiveWindowWindowsWindowCommandBarsMailEnvelopeTaskPanesTaskPaneHTMLDocumentHTMLWindowWindowXDocument

XDocumentUserXDocumentsXDocumentDataObjectsDataObjectDOMQueryAdapterADOAdapterWebServiceAdapterXMLFileAdapter

DataAdaptersDAVAdapterEmailAdapterHWSAdapterSharePointListAdapter

Legend

Automationobject

ExternalApplication

Eventobjects

DataDOMEvent

DocActionEvent

DocContextChangeEvent

DocEvent

DocReturnEvent

MergeEvent

SaveEvent

SignEvent

VersionUpgradeEvent

General-purposecollection

XMLNodes

Page 112: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

WebServiceAdapterDOMErrorsError

ExtensionQueryAdapter

ADOAdapterWebServiceAdapterXMLFileAdapter

SignedDataBlocksSignedDataBlockSignaturesSignatureCertificate

SolutionDOM

UIUtil

DateMath

ViewWindow

ViewInfosViewInfo

Page 113: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DataAdaptersCollection

ContainsadataadapterobjectcorrespondingtoeachdataconnectionusedwithinaMicrosoftOfficeInfoPath2003form.

Page 114: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksEachdataconnectionisusedtoretrievedata(insertedintothemaindatasourceorintoasecondarydatasource)ortosubmitdata.

Adataconnectionusedtoretrievedataforthemaindatasourcewillcorrespondtooneofthefollowingdataadapterobjecttypes:

WebServiceAdapter

ADOAdapter

NoteAnAdoAdapterobjectusedtoretrievedataforthemaindatasourcecanalsosubmitdata.

Adataconnectionusedtoretrievedataforasecondarydatasourcewillcorrespondtooneofthefollowingdataadapterobjecttypes:

ADOAdapter

SharepointListAdapter

WebServiceAdapter

XMLFileAdapter

Adataconnectionusedonlyforsubmittingdatawillcorrespondtooneofthefollowingdataadapterobjecttypes:

EmailAdapter

DAVAdapter

HWSAdapter

WebServiceAdapter

TheDataAdapterscollectioncanbeaccessedusingtheDataAdapterspropertyoftheXDocumentobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003Service

Page 115: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Pack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 116: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 117: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DataObjectsCollection

DataObjects DataObject

ContainsaDataObjectobjectforeachsecondarydatasourceusedwithinaMicrosoftOfficeInfoPath2003form.EachDataObjectobjectprovidesaccesstotheparticulardataadapterobjectthatwasusedtoconnecttotheexternaldatasource.

Page 118: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheDataObjectscollectionimplementspropertiesthatcanbeusedtoaccessaform'sassociatedDataObjectobjects,anditisaccessiblethroughtheDataObjectspropertyoftheXDocumentobject.

NoteTheDataObjectscollectioncanbeusedonlytogetthecountofDataObjectobjectsthatitcontainsortoreturnareferencetoaspecifiedDataObjectobject.Itcannotbeusedtocreate,add,orremoveDataObjectobjects.

Page 119: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheDataObjectscollectionInthefollowingexample,implementedasanOnClickeventhandlerforabuttononaform,theDataObjectspropertyoftheXDocumentobjectisusedtosetareferencetotheDataObjectscollection.ThecodethenloopsthroughthecollectionanddisplaysthepositionalindexandnameofeachDataObjectobjectthatitcontains:

functionShowDataObjectNames::OnClick(eventObj){//SetareferencetotheDataObjectscollection.varobjDataObjects=XDocument.DataObjects;

//Loopthroughthecollectionanddisplaythename//ofeachDataObjectobjectthatitcontains.for(i=0;i<objDataObjects.Count;i++){XDocument.UI.Alert("Dataobject"+i+":"+objDataObjects(i).Name);}objDataObjects=null;}

FormoreinformationaboutusingtheDataObjectscollection,seeAccessingexternaldatasources.

Page 120: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ErrorsCollection

Errors Error

ContainsanErrorobjectforeacherrorwithinaMicrosoftOfficeInfoPath2003form.AnErrorobjectcontainsinformationaboutanInfoPatherror,includingitsdetailedmessage,shortmessage,code,type,andtheXMLnodethatisassociatedwithit.

Page 121: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheErrorscollectionisafull-featuredcollection—itprovidespropertiesandmethodsforadding,deleting,andgainingaccesstotheErrorobjectsthatitcontains.

InadditiontomanagingtheerrorsgeneratedbyInfoPath,theErrorscollectioncanalsobeusedtocreatecustomerrorsusingtheAddmethod.

NoteCustomerrorscanalsobecreatedusingtheReportErrormethodoftheDataDOMEventobject.

Page 122: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheErrorscollectionTheErrorscollectionisaccessedthroughtheErrorspropertyoftheXDocumentobject.TheErrorscollectionisassociatedwithaform'sunderlyingXMLdocumentsothatwhenanerroroccurs,itoccurswithintheXMLdocument.

Inthefollowingexample,theCountpropertyoftheErrorscollectionisusedgetthecountoferrorscurrentlycontainedinthecollection:

XDocument.UI.Alert("Countoferrors:"+XDocument.Errors.Count);

TodeleteaspecificerrorfromtheErrorscollection,usetheDeletemethod,passingtheXMLcodeandconditionnameasarguments:

XDocument.Errors.Delete(myXMLNode,"MyErrorName");

TodeletealloftheerrorsintheErrorscollection,usetheDeleteAllmethod:

XDocument.Errors.DeleteAll();

TosetareferencetoanerrorwithintheErrorscollection,usetheItemproperty:

varobjError;

objError=XDocument.Errors.Item(0);//Or...objError=XDocument.Errors(0);

FormoreinformationaboutusingtheErrorscollection,seeHandlingerrors.

Page 123: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignaturesCollection

ContainsacollectionofSignatureobjectsforeachsignatureintheMicrosoftOfficeInfoPath2003formorSignedDataBlockobject.

Page 124: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheSignaturescollectionimplementspropertiesandamethodthatcanbeusedtoaccessaform'sassociatedSignatureobjectsandtocreateasignature.ItisaccessiblethroughtheSignedDataBlockobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 125: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheSignaturescollectionWhenusingtheCreatemethod,thesignatureisnotwrittenuntiltheSignmethodiscalledontheSignatureobject.ThesemethodscanbecalledonlyfromtheOnSigneventhandler.

Page 126: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 127: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignedDataBlocksCollection

ThecollectionoftheSignedDataBlockobjectsintheformtemplateasdefinedintheformdefinitionfile(.xsf).

Page 128: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheSignedDataBlockscollectionimplementspropertiesthatcanbeusedtoaccesstheSignedDataBlockobjectsassociatedwithaform.TheSignedDataBlockscollectionisaccessiblethroughtheSignedDataBlockspropertyoftheXDocumentobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 129: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 130: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TaskPanesCollection

TaskPanes TaskPane

ContainsacollectionofTaskPaneobjectsthatrepresentthetaskpanesassociatedwithawindowinMicrosoftOfficeInfoPath2003.

Page 131: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheTaskPanescollectionprovidespropertiesthatcanbeusedtoaccessacollectionoftaskpaneobjects,anditisaccessedthroughtheTaskPanespropertyoftheWindowobject.

NoteTheTaskPanescollectioncanbeusedonlytogetthecountofTaskPaneobjectsthatitcontainsandtoreturnareferencetoaspecifiedTaskPaneobject.ItcannotbeusedtoaddorremoveTaskPaneobjects.

Page 132: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheTaskPanescollectionInthefollowingexample,theTaskPanespropertyoftheWindowobjectisusedtosetareferencetotheTaskPanescollection:

varobjTaskPanes;

objTaskPanes=XDocument.View.Window.TaskPanes;

Inthefollowingexample,theItempropertyoftheTaskPanescollectionisusedtosetareferencetoaspecifiedTaskPaneobject.ThenthecodeusestheVisiblepropertyoftheTaskPaneobjecttomakethetaskpanevisible.

varobjTaskPane;

//Showthebuilt-inHelptaskpane.objTaskPane=XDocument.View.Window.TaskPanes(4);objTaskPane.Visible=true;

NoteTheItempropertyargumentisthetypeoftaskpanetoreturn,basedontheTypepropertyoftheTaskPaneobject,notthepositionoftheTaskPaneobjectintheTaskPanescollection.

Page 133: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 134: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ViewInfosCollection

ViewInfos ViewInfo

ContainsaViewInfoobjectforeachviewwithinaMicrosoftOfficeInfoPath2003form.ViewInfoobjectscontaindescriptiveinformationabouttheviewsthattheyareassociatedwith.

Page 135: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheViewInfoscollectionimplementspropertiesthatcanbeusedtoaccessaform'sassociatedViewInfoobjects,anditisaccessiblethroughtheViewInfospropertyoftheXDocumentobject.

NoteTheViewInfoscollectioncanbeusedonlytogetthecountofViewInfoobjectsthatitcontainsortoreturnareferencetoaspecifiedViewInfoobject.Itcannotbeusedtocreate,add,orremoveViewInfoobjects.

Page 136: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheViewInfoscollectionInthefollowingexample,implementedasanOnClickeventhandlerforabuttononaform,theViewInfospropertyoftheXDocumentobjectisusedtosetareferencetotheViewInfoscollection.ThecodethenloopsthroughthecollectionanddisplaysthepositionalindexandnameofeachViewInfoobjectthatitcontains.

functionShowViewNames::OnClick(eventObj){//SetareferencetotheViewInfoscollection.varobjViewInfos=XDocument.ViewInfos;

//Loopthroughthecollectionanddisplaythename//ofeachViewInfoobjectthatitcontains.for(i=0;i<objViewInfos.Count;i++){XDocument.UI.Alert("Viewname"+i+":"+objViewInfos(i).Name);}objViewInfos=null;}

Page 137: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 138: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

WindowsCollection

Windows Window

ContainsaWindowobjectforeachwindowwithinaMicrosoftOfficeInfoPath2003form.WindowobjectsrepresentthetwotypesofwindowsthatareusedintheInfoPathapplication:theeditingwindowthatisusedastheformareawhenauserfillsoutaform,andthedesigningwindowthatisusedasthedesignmodewhenauserdesignsaform.

Page 139: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheWindowscollectionimplementspropertiesthatcanbeusedtoaccessaform'sassociatedWindowobjects,anditisaccessiblethroughtheWindowspropertyoftheXDocumentobject.

NoteTheWindowscollectioncanbeusedonlytogetthecountofWindowobjectsthatitcontainsortoreturnareferencetoaspecifiedWindowobject.Itcannotbeusedtocreate,add,orremoveWindowobjects.

Page 140: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheWindowscollectionInthefollowingexample,implementedasanOnClickeventhandlerforabuttononaform,theWindowspropertyoftheApplicationobjectisusedtosetareferencetotheWindowscollection.ThecodethenloopsthroughthecollectionanddisplaysthetypeofeachWindowobjectthatitcontains.

functionShowWindowTypes::OnClick(eventObj){//SetareferencetotheWindowscollection.varobjWindows=Application.Windows;varstrWindowType;

//Loopthroughthecollectionanddisplaythetype//ofeachWindowobjectthatitcontains.for(i=0;i<objWindows.Count;i++){switch(objWindows(i).Type){case0:strWindowType="Editingwindow";break;case1:strWindowType="Designingwindow";break;}

XDocument.UI.Alert("Windowtype"+i+":"+strWindowType);}objWindows=null;strWindowType=null;}

Page 141: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

FormoreinformationaboutusingtheWindowscollection,seeWorkingwithformwindows.

Page 142: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentsCollection

XDocuments XDocument

ContainsanXDocumentobjectforeachMicrosoftOfficeInfoPath2003formthatiscurrentlyopen.TheXDocumentobjectrepresentsaform'sunderlyingXMLdocumentandcanbeusedtointeractwiththeXMLdatathataformcontains.

Page 143: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheXDocumentscollectionimplementsanumberofpropertiesandmethodsthatcanbeusedtoaccessaform'sassociatedXDocumentobject,ortocreateandopentheformsthemselves.TheXDocumentscollectionisaccessedthroughtheXDocumentspropertyoftheApplicationobject.

Page 144: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheXDocumentscollectionInthefollowingexample,theOpenmethodoftheXDocumentscollectionisusedtoopenanexistingform:

Application.XDocuments.Open("C:\\MyForm.xml");

YoucanalsocreateanewformbasedonanexistingformusingtheNewmethod:

Application.XDocuments.New("C:\\MyForm.xml");

ToaccessanXDocumentobjectcontainedintheXDocumentscollection,youcanpassthepositionalindexorthelocationpathtotheItemmethod:

varobjXDoc;

objXDoc=Application.XDocuments(0);//or...objXDoc=Application.XDocuments("C:\\MyForm.xml");

FormoreinformationaboutusingtheXDocumentscollection,seeAccessingformdata.

Page 145: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 146: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XMLNodesCollection

XMLNodes

ContainsacollectionofXMLDocumentObjectModel(DOM)nodes.TheXMLNodescollectionisageneral-purposecollectionthatisusedbyanumberofMicrosoftOfficeInfoPath2003methods.

Page 147: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheXMLNodescollectionprovidespropertiesthatcanbeusedtoaccessacollectionofXMLDOMnodes,anditisreturnedbyboththeGetSelectedNodesandGetContextNodesmethodsoftheViewobject.

AfteryouhavesetareferencetooneoftheXMLDOMnodeobjectsthattheXMLNodescollectioncontains,youcanuseanyofthepropertiesandmethodsthattheXMLDOMprovidesforinteractingwithanXMLnodeobject.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

Page 148: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheXMLNodescollectionInthefollowingexample,areferenceissettoacollectionofXMLDOMnodesreturnedbytheGetSelectedNodesmethodoftheViewobject.ThenthecodedisplaysthenameandsourceXMLofthefirstnodefoundinthecollectionusingamessagebox:

varobjXMLNodes;

objXMLNodes=XDocument.View.GetSelectedNodes();

if(objXMLNodes.Count>0){XDocument.UI.Alert(objXMLNodes(0).nodeName+"\n\n"+objXMLNodes(0).text);}

Page 149: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 150: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ADOAdapterObject

ADOAdapter

RepresentsaconnectiontoaMicrosoftActiveXDataObjects/OLEDBdatasource.TheADOAdapterobjectisatypeofMicrosoftOfficeInfoPath2003dataadapterthatcontainsalltheinformationnecessaryforretrievingandsubmittingdatatoanexternaldatasource.

Page 151: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksForsecondarydatasources,theADOAdapterobjectprovidespropertiesthatcanbeusedtogetandsetinformationaboutthedataadapter'sconnectionstring,SQLcommandtext,andtimeoutvalue.ItalsoprovidesamethodforcreatinganSQLcommandtextfragmentbasedonaspecifiedXMLnode.

IfanADO/OLEDBdatasourceisusedastheprimarydatasourceforaform,theADOAdapterobjectisaccessiblethroughtheQueryAdapterpropertyoftheXDocumentobject.

NoteTheADOAdapterobjectislimitedtoworkonlywithMicrosoftSQLServerandMicrosoftAccessdatabases.

Page 152: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheADOAdapterobjectTheADOAdapterobjectisaccessiblethroughtheQueryAdapterpropertyoftheDataObjectobject,andDataObjectobjectsareaccessiblethroughtheDataObjectspropertyoftheXDocumentobject.

Inthefollowingexample,theTimeoutpropertyoftheADOAdapterobjectisusedtosetthetimeoutforaparticularqueryoperation,returningthetimeouttoitsoriginalvalueafterthequeryoperationiscomplete:

functionRunLongQuery(){

varobjADOAdapter;varintTimeout;//SetareferencetotheADOAdapterobject.objADOAdapter=XDocument.DataObjects("CityDropDownList").QueryAdapter;

//Savetheoriginaltimeoutvalue.intTimeout=objADOAdapter.Timeout;

//Setalongertimeoutvalueandthenrunthequery.objADOAdapter.Timeout=60;XDocument.DataObjects("CityDropDownList").Query();

//Restoretheoriginaltimeoutvalue.objADOAdapter.Timeout=intTimeout;objADOAdapter=null;intTimeout=null;}

FormoreinformationaboutusingtheADOAdapterobject,see

Page 153: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Accessingexternaldatasources.

Page 154: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 155: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ApplicationObject

Application

RepresentstheMicrosoftOfficeInfoPath2003application.TheApplicationobjectincludespropertiesandmethodsthatreturnreferencestothehigh-levelobjectsoftheInfoPathobjectmodel.Forexample,theXDocumentspropertyreturnsareferencetoacollectionofXDocumentobjects.

Page 156: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheApplicationobjectisthetop-levelobjectintheInfoPathobjectmodel,anditprovidesanumberofpropertiesandmethodsthatcanbeusedtoaccesslower-levelcollectionsandobjectsintheobjectmodel,andtoperformavarietyofgeneralpurposefunctions.

Page 157: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheApplicationobjectTheApplicationobjectcanbeuseddirectlyinscriptingcodeasinthefollowingMicrosoftJScriptexample,whichusestheAlertmethodoftheUIobject,accessedthroughtheXDocumentobject,todisplayamessageboxthatindicatestheversionnumberofthecurrentinstanceofInfoPath:

XDocument.UI.Alert("Applicationversion:"+Application.Version);

NotethattheXDocumentpropertywasnotqualifiedwiththenameoftheApplicationobject.ThisisbecauseboththeApplicationobjectandtheXDocumentobjectareembeddeddirectlyintheInfoPathscriptengine,andthereforetheydonothavetobeexplicitlydeclared.However,theydoneedtobedeclaredwhenusedinanexpressionorargument,astheexampleabovedemonstrates.

NoteTheApplicationobjectcontainsthefollowingmethodsthatcanbeusedwithinInfoPath:

Method DescriptionFormatString FormatsthespecifiedstringorXMLnode

accordingtothespecifiedcategoryandoptionsparameters.

IsDestinationReachable ReturnsaBooleanvalueindicatingwhetherthespecifiedUniformResourceLocator(URL),universalnamingconvention(UNC)path,orIPaddressofthedestinationcomputercanbeconnectedtofromtheclientcomputer.

NewADODBConnection CreatesandreturnsareferencetoanemptyActiveXDataObjects(ADO)Connectionobject.

NewADODBRecordset CreatesandreturnsareferencetoanemptyActiveXDataObjects(ADO)Recordsetobject.

NoteTheApplicationobjectcontainsthefollowingmethodsthatcanbe

Page 158: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

usedforexternalautomation:

Method DescriptionCacheSolution Examinestheformtemplateinthecacheand,if

necessary,updatesitfromthepublishedlocationoftheformtemplate.

Quit QuitstheMicrosoftOfficeInfoPath2003application.

RegisterSolution InstallsthespecifiedMicrosoftOfficeInfoPathformtemplate.

UnregisterSolutionUninstallsthespecifiedMicrosoftOfficeInfoPath2003formtemplate.

TheXDocumentscollectioncontainsthefollowingadditionalmethodsthatcanbeusedforexternalautomation:

Method DescriptionClose ClosesthespecifiedMicrosoftOffice

InfoPath2003form.New CreatesanewMicrosoftOfficeInfoPath

2003formbasedonthespecifiedform.NewFromSolution CreatesanewMicrosoftOfficeInfoPath

2003formbasedonthespecifiedformtemplate.

NewFromSolutionWithData CreatesanewMicrosoftOfficeInfoPath2003formusingthespecifiedXMLdataandformtemplate.

Open OpensthespecifiedMicrosoftOfficeInfoPath2003form.

AlthoughtheExternalApplicationobjectisdeprecatedinMicrosoftOfficeInfoPath2003ServicePack1,replacedwiththemethodsintheabovetables,ExternalApplicationmethodsarestillavailableforbackwardcompatibility.

FormoreinformationaboutusingtheApplicationobject,seeAccessingapplicationdata.

Page 159: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ButtonObject

TheButtonobjectistheMicrosoftOfficeInfoPath2003objectthatisusedtoimplementtheOnClickeventthatisassociatedwithabuttononanInfoPathform.Thisobjectcannotbeuseddirectlyincode.

Page 160: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 161: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CertificateObject

RepresentstheX.509digitalcertificatethathasbeenusedtocreateasignature.

Page 162: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 163: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheCertificateobjectUsetheCertificatepropertyoftheSignatureobjecttoreturnaCertificateobject.

TheCertificateobjectcontainsthefollowingproperties,whichcanbeusedtoreturninformationaboutadigitalcertificate:

Property DescriptionIssuedTo Returnstowhomthedigitalcertificateisissued.IssuedBy Returnstheissuerofthedigitalcertificate.ExpirationDateReturnstheexpirationdateofthedigitalcertificate.Status Returnsthestatusofthedigitalcertificate.

Page 164: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 165: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DataDOMObject

DataDOM

TheDataDOMobjectistheMicrosoftOfficeInfoPath2003objectthatisusedtoimplementthedatavalidationeventsthatareassociatedwiththeXDocumentobject.Thisobjectcannotbeuseddirectlyinscriptingcode.

Page 166: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 167: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DataDOMEventObject

DataDOMEvent

AneventobjectthatisusedduringMicrosoftOfficeInfoPath2003datavalidationevents.TheDataDOMEventobjectprovidesanumberofpropertiesandamethodthatcanbeusedwithinadatavalidationeventtoprogrammaticallyinteractwiththedatathatisbeingvalidatedandtoprovidearesponseifthedataisnotvalid.

Page 168: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheDataDOMEventobjectispassedasaparametertotheOnBeforeChange,OnValidate,andOnAfterChangeevents.

NoteTheOnValidateeventcanoccurwithoutachangeintheform'sunderlyingXMLdocument.

TheDataDOMEventobjectisusedtogetinformationabouttheXMLDocumentObjectModel(DOM)nodethatisbeingchanged,anditalsoprovidesapropertyforgettingareferencetoaform'sunderlyingXMLdocument.Inaddition,itprovidespropertiesforhandlingthechangeindata,includingrejectingthechangeandcreatinganerrormessage.

NoteTheDataDOMEventobjectispassedasanargumenttooneofthedatavalidationeventhandlers.Itspropertiesandmethodareonlyavailableduringtheeventthatitispassedto.

Page 169: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheDataDOMEventobjectInthefollowingexamplefromtheDataValidationdevelopersampleform,theDataDOMEventobjectisusedtocheckthevalueofthenodeusingtheSiteproperty.Ifthedatavalidationfails,theReportErrormethodisusedtocreateacustomerror.

functionmsoxd__itemB_quantityListB::OnValidate(eventObj){if(parseInt(eventObj.Site.nodeTypedValue,10)>50)eventObj.ReportError(eventObj.Site,"Invalidquantity."+"Thetotalnumberofeachtypeofblockcannotexceed50.",false);

if(parseInt(eventObj.Site.nodeTypedValue,10)<0)eventObj.ReportError(eventObj.Site,"Invalidquantity."+"Thetotalnumberofeachtypeofblockcannotbelessthan0.",false);}

FormoreinformationaboutusingtheDataDOMEventobject,seeRespondingtoformevents.

Page 170: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 171: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DataObjectObject

DataObjects DataObject

Representsalinktothedataadapterofasecondarydatasource.TheDataObjectobjectactsasanintermediarybetweenaMicrosoftOfficeInfoPath2003formandthedataadapterobjectthatisusedtoaccessdatathatiscontainedinanexternaldatasource.

TheDataObjectobjectprovidespropertiesandmethodsthatcanbeusedtoprogrammaticallyinteractwithdataadapterobjects,includingretrievinginformationaboutthedataadapterobjectsandaccessingthedatathattheyconnectto.TheDataObjectobjectisaccessiblethroughtheDataObjectspropertyoftheXDocumentobject.

Page 172: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAnexternaldatasourcecantaketheformofaMicrosoftAccessorMicrosoftSQLServerdatabase,an.xmlfile,oranXMLWebservice.Thetypeofdataadapterobjectusedtoaccesstheexternaldatasourcedependsonthetypeofdatasource.TheDataObjectobjectprovidesacommonsetofpropertiesandamethodthatcanbeusedforalltypesofdataadapterobjects,andeachofthedataadapterobjectsprovidesitsownsetofpropertiesandmethods.

MicrosoftOfficeInfoPath2003supportsthreetypesofdataadapters:

1. ActiveXDataObjectsRepresentedbytheADOAdapterobject.

2. WebservicesRepresentedbytheWebServiceAdapterobject.

3. XMLfileRepresentedbytheXMLFileAdapterobject.

Page 173: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheDataObjectobjectInthefollowingcodesample,thenameofthesecondarydatasourceispassedtotheItempropertyoftheDataObjectscollection,whichreturnsareferencetotheDataObjectobject,which,inthiscase,isassociatedwithanADOAdapterdataadapterobject.UsingtheQueryAdapterpropertyoftheDataObjectobject,theADOAdapterdataadapterobject'sConnectionpropertyisusedtodisplaytheADOconnectionstringinamessagebox.

functionTestDataObjects(){varobjDataObject;//Setareferencetothespecifieddataobject.objDataObject=XDocument.DataObjects("CityList");//DisplaytheconnectioninformationfortheADOAdapterobject.XDocument.UI.Alert("DataAdapter:"+objDataObject.QueryAdapter.Connection);objDataObject=null;}

FormoreinformationaboutusingtheDataObjectobject,seeAccessingexternaldatasources.

Page 174: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 175: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DateObject

Providesseveraldate-relatedmethodsthatcanbeusedinMicrosoftOfficeInfoPath2003forms.

Page 176: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsetheDatepropertyoftheUtilobjecttoreturnaDateobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 177: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheDateobjectTheDateobjectcontainsthefollowingmethods:

Method DescriptionNow ReturnsaVariantthatrepresentsthecurrentsystemdateand

timeinISOformat.Today ReturnsaVariantcontainingthecurrentsystemdateinISO

format.

Page 178: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 179: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DAVAdapterObject

RepresentsaconnectiontosubmitforminformationtoaMicrosoftWindowsSharePointServicesserver,orotherserversthatsupportDAVconnections.

Page 180: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsetheItempropertyoftheDataAdapterscollectiontoreturnaDAVAdapterobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 181: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheDAVAdapterobjectTheDAVAdapterobjectcontainsthefollowingproperties:

Property DescriptionFileName ReturnsorsetsthefilenameforthecurrentMicrosoft

OfficeInfoPath2003formwhenitissubmittedbytheDAVAdapterobject.

FolderURL ReturnsorsetsthetheUniformResourceLocator(URL)towhichtheformwillbesubmittedbytheDAVAdapterobject.

Name ReturnsthenameofaDAVAdapterobject.QueryAllowed CorrespondstothequeryAllowedattributeintheform

definitionfile(.xsf).AlwaysreturnsFalsefortheDAVAdapterobject.

SubmitAllowed CorrespondstothesubmitAllowedattributeintheformdefinitionfile(.xsf).AlwaysreturnsTruefortheDAVAdapterobject.

TheDAVAdapterobjectcontainsthefollowingmethods:

Method DescriptionQuery BecausetheDAVAdapterobjectisavailableforsubmitting

dataonly,thismethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

Submit Executesthesubmitoperationontheassociatedadapter.SubmitData SubmitsthespecifiedDOMelementorDOMdocumenttoa

dataadapter.

Page 182: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 183: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DocActionEventObject

DocActionEvent

AneventobjectthatisusedduringaMicrosoftOfficeInfoPath2003buttonclickevent.TheDocActionEventobjectprovidesanumberofpropertiesthatcanbeusedwithinabuttonclickeventtoprogrammaticallyinteractwiththedatainaform'sunderlyingXMLdocumentandtocontrolthesuccessorfailureoftheevent.

Page 184: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheDocActionEventobjectispassedasaparametertotheOnClickeventbuttonthatiscontainedinaviewofanInfoPathform.ItspropertiesareavailableonlyduringtheOnClickevent.

Page 185: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheDocActionEventobjectInthefollowingexample,theSourcepropertyoftheDocActionEventobjectisusedtodisplaythesourceXMLdataoftheinner-mostXMLDocumentObjectModel(DOM)nodeoftheform'sunderlyingXMLdocument,whichcontainsthebutton:

functionShowDocActionEventSource::OnClick(eventObj){XDocument.UI.Alert("Source:"+eventObj.Source.xml);}

FormoreinformationaboutusingtheDocActionEventobject,seeRespondingtoformevents.

Page 186: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DocContextChangeEventObject

AneventobjectthatisusedduringaMicrosoftOfficeInfoPath2003contextchangeevent.TheDocContextChangeEventobjectprovidesanumberofpropertiesthatcanbeusedwithinacontextchangetoprogrammaticallyinteractwiththedatainaform'sunderlyingXMLdocument,toprovidecontextualfeedbacktotheuser,ortoperformactionsfortheuser.

Page 187: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheDocContextChangeEventobjectispassedasaparametertotheOnContextChangeevent.

TheDocContextChangeEventobjectisusedtogetinformationabouttheXMLDocumentObjectModel(DOM)nodethatisthecurrentcontextoftheform'sunderlyingXMLdocument.Inaddition,itprovidesinformationaboutthetypeofcontextchangeandwhetherthechangehappenedinresponsetoanundoorredooperationperformedbytheuser.

AsdescribedintheOnContextChangeeventtopic,theTypepropertyreturnsonlythevalue"ContextNode"forcontextchangesinMicrosoftInfoPath2003ServicePack1.Nevertheless,ifcodeinaneventhandlerperformsactionsthatdependoncurrentfunctionality,thatcodeshouldstillbedesignedtocheckthevalueoftheTypeproperty,becausefutureversionsofInfoPathmayusedifferentvaluesfordifferentcontextchanges.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 188: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheDocContextChangeEventobjectWhentheIsUndoRedopropertyoftheDocContextChangeEventobjectisTrue,thecontextchangewascausedbyanundoorredooperationratherthananexplicitusercontextchange.OperationsperformedintheOnContextChangeeventhandlerthatmodifytheXMLDOMshouldbeavoidedinresponsetoundoorredoactions,becausetheymayinterferewiththeuser'sintentiontorevertdatatoapreviousstate.

Page 189: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,anodenamedlastChangedisupdatedinresponsetocontextchanges:

functionXDocument::OnContextChange(eventObj){if(eventObj.Type=="ContextNode"&&!eventObj.IsUndoRedo){varoContextNode=eventObj.Context;varoLastChangedNode=XDocument.DOM.selectSingleNode("my:lastChanged");oLastChangedNode.text=oContextNode.nodeName;}}

Page 190: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DocEventObject

DocEvent

AneventobjectthatisusedduringaMicrosoftOfficeInfoPath2003mergeorviewswitchingevent.TheDocEventobjectprovidestheXDocumentpropertythatcanbeusedwithinamergeorviewswitchingeventtoprogrammaticallyinteractwiththedatainaform'sunderlyingXMLdocument.

Page 191: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheDocEventobjectispassedasaparametertotheOnSwitchViewandOnAfterChangeeventsofanInfoPathform.TheXDocumentpropertythatitprovidesisavailableonlyduringtheseevents.

Page 192: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheDocEventobjectInthefollowingexample,theXDocumentpropertyoftheDocEventobjectisusedtodisplaythesourceXMLofaform'sunderlyingXMLdocumentusingtheDOMpropertyoftheXDocumentobject:

functionXDocument::OnSwitchView(eventObj){XDocument.UI.Alert("ThesourceXML:"+eventObj.XDocument.DOM.xml);}

FormoreinformationaboutusingtheDocEventobject,seeRespondingtoformevents.

Page 193: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DocReturnEventObject

DocReturnEvent

AneventobjectthatisusedduringaMicrosoftOfficeInfoPath2003loadorsubmissionevent.TheDocReturnEventobjectprovidestheXDocumentpropertythatcanbeusedwithinaloadorsubmissioneventtoprogrammaticallyinteractwiththedatainaform'sunderlyingXMLdocument.ItalsoprovidestheReturnStatuspropertythatisusedtospecifywhethertheeventissuccessful.

Page 194: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheDocReturnEventobjectispassedasaparametertotheOnLoadandOnSubmitRequesteventsofanInfoPathform.Thepropertiesthatitprovidesareavailableonlyduringtheseevents.

Page 195: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheDocReturnEventobjectInthefollowingexample,theXDocumentpropertyoftheDocReturnEventobjectisusedtodisplaythesourceXMLofaform'sunderlyingXMLdocumentusingtheDOMpropertyoftheXDocumentobject:

functionXDocument::OnLoad(eventObj){XDocument.UI.Alert("ThesourceXML:"+eventObj.XDocument.DOM.xml);eventObj.ReturnStatus=true;}

FormoreinformationaboutusingtheDocReturnEventobject,seeRespondingtoformevents.

Page 196: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 197: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

EmailAdapterObject

Representsthedataadapterforsubmittingforminformationine-mailbyusingMicrosoftOfficeOutlook.

Page 198: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 199: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheEmailAdapterobjectUsetheItempropertyoftheDataAdapterscollectiontoreturnanEmailAdapterobject.

Inthefollowingexample,areferencetotheEmailAdapterobjectissetbypassingthenameoftheEmailAdapterobjecttotheItempropertyoftheDataAdapterscollection:

varobjEmailAdapter;objEmailAdapter=XDocument.DataAdapters("MainSubmit");

Afterthereferencehasbeenset,youcanusethepropertiesoftheEmailAdapterobjectasshowninthefollowingexample,whichsetstheTopropertiesandtheSubjectproperty,thensubmitstheform.

objEmailAdapter.To="[email protected]";objEmailAdapter.Subject="StatusReport";objEmailAdapter.Submit();

TheEmailAdapterobjectcontainsthefollowingproperties:

Property DescriptionAttachmentFileNameReturnsorsetsthefilenametobeusedforthe

currentformwhenattachedtothee-mailmessageforanEmailAdapterobject.

BCC ReturnsorsetstheBCCrecipientsforanEmailAdapterobject.

CC ReturnsorsetstheCCrecipientsforanEmailAdapterobject.

Intro Returnsorsetstheintroductioninthebodyofthee-mailmessageforanEmailAdapterobject.

Name ReturnsthenameofanEmailAdapterobject.QueryAllowed CorrespondstothequeryAllowedattributeinthe

formdefinitionfile(.xsf).AlwaysreturnsFalsefortheEmailAdapterobject.

Page 200: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Subject Returnsorsetsthesubjectofthee-mailmessageforthespecifiedEmailAdapterobject.

SubmitAllowed CorrespondstothesubmitAllowedattributeintheformdefinitionfile(.xsf).AlwaysreturnsTruefortheEmailAdapterobject.

To ReturnsorsetstheTorecipientsforthespecifiedEmailAdapterobject.

TheEmailAdapterobjectcontainsthefollowingmethods:

Method DescriptionQuery BecausetheEmailAdapterobjectisavailablefor

submittingdataonly,thismethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

Submit Executesthesubmitoperationontheassociateddataadapter.

SubmitData SubmitsthespecifiedDOMelementorDOMdocumenttoadataadapter.

Page 201: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 202: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ErrorObject

Errors Error

RepresentsanerrorinaMicrosoftOfficeInfoPath2003form.EachErrorobjectinInfoPathiseachassociatedwithanXMLDocumentObjectModel(DOM)nodefromaform'sunderlyingXMLdocument.WhendatavalidationfailsforaparticularXMLDOMnode,InfoPathcreatesanErrorobjectandplacesitintheErrorscollection.

Page 203: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThatarethreetypesofdatavalidationerrorsthatcanoccurinanInfoPathform:

SCHEMA_VALIDATIONDatavalidationfailedasaresultofanXMLSchema–definedconstraint.

SYSTEM_GENERATEDDatavalidationfailedasaresultofconstraintsdefinedintheformdefinition(.xsf)fileorasaresultofscriptingcodecallingtheReportErrormethodoftheDataDOMEventobject.

USER_SPECIFIEDDatavalidationfailedasaresultofacustomscriptingerrorusingtheAddmethodoftheErrorscollection.

NoteTheTypepropertyoftheErrorobjectcanbeusedtodeterminethetypeofdatavalidationerrorthathasoccurred.

Page 204: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheErrorObjectTheErrorobjectprovidesanumberofpropertiesthatcanbeusedtoprogrammaticallyinteractwithanInfoPathdatavalidationerror.TheErrorobjectisaccessedthroughtheErrorspropertyoftheXDocumentobject,whichreturnsareferencetotheErrorscollection.

Inthefollowingexample,theItempropertyoftheErrorscollectionisusedtosetareferencetoanErrorobject;thentheShortErrorMessagepropertyoftheErrorobjectisisusedtodisplaytheerrormessageinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errormessage:"+objError.ShortErrorMessage);

FormoreinformationaboutusingtheErrorobject,seeHandlingerrors.

Page 205: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 206: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExternalApplicationObject

ExternalApplication

RepresentstheMicrosoftOfficeInfoPath2003application.TheExternalApplicationobjectimplementsalimitedsetofmethodsthatcanbeusedforautomatingInfoPathbyanexternalComponentObjectModel(COM)–basedprogramminglanguage.

Page 207: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheExternalApplicationobjectcanbeusedtoperformalimitedsetofInfoPathoperationssuchascreating,opening,orclosingaform;registeringorunregisteringaformtemplate;orsimplyquittingtheapplication.

Page 208: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheExternalApplicationobjectTousetheExternalApplicationobject,youmustfirstcreateareferencetoitusingtheProgIDoftheInfoPathobjectmodelalongwiththenameoftheExternalApplicationobject.ThefollowingexampledemonstratescreatingareferencetotheExternalApplicationobjectusingtheVisualBasicforApplications(VBA)programminglanguage:

DimobjIPAsObjectSetobjIP=CreateObject("InfoPath.ExternalApplication")

NoteThisexampleuseslate-bindingforcreatingthereferencetotheExternalApplicationobject;youcanalsouseearly-bindingbysettingareferencetotheInfoPathobjectmodelinyourprogrammingenvironment.

AfteryouhavecreatedareferencetotheExternalApplicationobject,youcanthenusethemethodsthatitprovidestointeractwithInfoPath.Inthefollowingexample,writteninVBA,theOpenmethodoftheExternalApplicationobjectisusedtoopenaformbasedonthespecifiedUniformResourceIdentifier(URI):

PublicSubOpenForm()

DimobjIPAsObject

'CreatetheExternalApplicationobjectandopenaspecifiedform.SetobjIP=CreateObject("InfoPath.ExternalApplication")objIP.Open("C:\MyForms\Form1.xml")

SetobjIP=Nothing

EndSub

FormoreinformationaboutusingtheExternalApplicationobject,seeAutomatingInfoPath.

Page 209: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 210: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

HTMLTaskPaneObject

HTMLTaskPane

RepresentsacustomtaskpaneinaMicrosoftOfficeInfoPath2003formthatisassociatedwithawindow.TheHTMLTaskPaneobjectprovidesanumberofpropertiesandmethodsforworkingwiththeInfoPathcustomtaskpane,anditprovidespropertiesandmethodstotheTaskPaneobjectasaninheritedobject.

Page 211: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThepropertiesandmethodsthatareavailableforanInfoPathtaskpanearedeterminedbythetypeoftaskpanethatyouareworkingwith.IftheTypepropertyoftheTaskPaneobjectreturns0,thetaskpaneisacustomtaskpaneandthepropertiesandmethodsthatareavailableareprovidedbytheHTMLTaskPaneobject.IftheTypepropertyreturnsanyothervalue,thetaskpaneisabuilt-intaskpaneandthepropertiesareprovidedbytheTaskPaneobjectdirectly.

TheTypepropertyisbasedontheXdTaskPaneTypeenumeration.TheseenumeratedvaluesarealsousedasargumentstotheItempropertyoftheTaskPanescollectionforreturningareferencetoaspecifiedtypeoftaskpane.

NoteThepropertiesandmethodsoftheHTMLTaskPaneobjectcannotbecalledduringanOnLoadeventbecausetheviewisnotyetloadedwhenthiseventoccurs,andtaskpanesareassociatedwiththeview.

Page 212: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheHTMLTaskPaneobjectInthefollowingexamplefromtheUserInterfacedevelopersampleform,theItempropertyoftheTaskPanescollectionisusedtosetaglobalreferencetotheTaskPaneobjectthatrepresentsthecustomtaskpane.ThecodethencallsascriptingfunctiondefinedintheHTMLcodeofthecustomtaskpaneusingtheHTMLDocumentpropertyoftheHTMLTaskPaneobject,whichisinheritedbytheTaskPaneobject.

functionSetTaskPaneState(){

//EnsureViewhasloadedbeforetryingtoaccessthetaskpane.if(XDocument.View){//Getareferencetothecustomtaskpane.Itisalwaysthe0-th//taskpaneintheTaskPanescollection.if(gobjTaskPane==null)gobjTaskPane=XDocument.View.Window.TaskPanes.Item(0);

//Ensurethatthetaskpaneiscompletelyloaded.if(gobjTaskPane.HTMLDocument.readyState=="complete"){varstrTaskPaneViewId="TP_"+XDocument.View.Name.replace(/\W+/g,"");

//CallascriptfunctiondefinedinthetaskpaneHTMLpage.gobjTaskPane.HTMLDocument.parentWindow.SelectView(strTaskPaneViewId);}}}

Page 213: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 214: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

HTMLTaskPaneExternalObject

HTMLTaskPaneExternal

RepresentsalinktotheMicrosoftOfficeInfoPath2003objectmodel.TheHTMLTaskPaneExternalobjectisusedtoexposetheInfoPathobjectmodeltotheDynamicHTML(DHTML)scriptingcodeinacustomtaskpane.

TheHTMLTaskPaneExternalobjectprovidesanumberofpropertiesforaccessingcertainpartsoftheInfoPathobjectmodel,includingtheXDocumentobjectandtheWindowobject.

Page 215: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheHTMLTaskPaneExternalobjectfacilitatesusingtheInfoPathobjectmodelwithinthescriptingcodethatispartofacustomtaskpane.TheobjectisexposedthroughtheexternalpropertyoftheDHTMLwindowobject.

Page 216: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheHTMLTaskPaneExternalobjectInthefollowingexample,theHTMLTaskPaneExternalobjectisusedthroughtheexternalpropertyoftheDHTMLwindowobjecttosetareferencetotheXDocumentobjectthatispartoftheInfoPathobjectmodel:

varobjXDoc;

objXDoc=window.external.XDocument;objXDoc.View.SwitchView("View2");

Page 217: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 218: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

HWSAdapterObject

RepresentsaconnectiontosubmitforminformationtoaMicrosoftBiztalk2004HWS(HumanWorkflowServices)server.

Page 219: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 220: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheHWSAdapterobjectTheHWSAdapterobjectcontainsthefollowingproperties:

Property DescriptionName ReturnsthenameofanHWSAdapterobject.QueryAllowed CorrespondstothequeryAllowedattributeintheform

definitionfile(.xsf).AlwaysreturnsFalsefortheHWSAdapterobject.

SubmitAllowed CorrespondstothesubmitAllowedattributeintheformdefinitionfile(.xsf).AlwaysreturnsTruefortheHWSAdapterobject.

TheHWSAdapterobjectcontainsthefollowingmethods:

Method DescriptionQuery BecausetheHWSAdapterobjectisavailableforsubmitting

dataonly,thismethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

Submit Executesthesubmitoperationontheassociatedadapter.

Page 221: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

InfoPathControlObject

DefinesmethodsusedfromtheimplementationofanActiveXcontrolforinitializing,uninitializing,enabling,disabling,andsavingthestateofacontrol.

Page 222: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 223: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheInfoPathControlObjectTheInfoPathControlobjectdefinesthefollowingmethodsthatmustbeimplementedbythedeveloperofanActiveXcontrolforuseonInfoPathforms.

Method DescriptionEnable DefinesamethodthatInfoPathcallswhenitneedstoenable

ordisableaninstanceofthecontrolinaview.Init Definesamethodthatperformsanyinitializationroutines

requiredwhenaninstanceofthecontrolisaddedtoanInfoPathform.

SaveState DefinesamethodthatInfoPathcallswhenitneedstosavethestateofaninstanceofthecontrolinaview.

Uninit Definesamethodthatperformsanycleanuproutinesrequiredbeforeaninstanceofthecontrolisremovedfromaview.

Page 224: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

InfoPathControlSiteObject

RepresentstheobjectthatInfoPathpassestoanActiveXcontrolwhenitisinitializedinanInfoPathview.TheInfoPathControlSiteobjectdefinestheXDocumentpropertyforaccessingtheXDocumentobjectassociatedwithaform,andtheNodepropertyforaccessingtheXMLnodetowhichthecontrolisbound.

Page 225: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheInfoPathControlSiteobjectshouldnotbeimplementedbythedeveloperofanActiveXcontrol.ItrepresentsaninterfacethatisimplementedbyInfoPathitself.

TheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 226: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

MailEnvelopeObject

MailEnvelope

Representsacustome-mailmessageinaMicrosoftOfficeInfoPath2003form.TheMailEnvelopeobjectprovidesanumberofpropertiesthatcanbeusedtoprogrammaticallycreateacustome-mailmessagewithinthedefaulte-maileditor,anditattachesthecurrentlyopenInfoPathformtothemessage.

Page 227: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfterthee-mailmessageiscreated,thedefaulte-maileditorwilldisplaythee-mailmessage;userscantheninspectandeditthee-mailmessagebeforesendingit.

NoteTheMailEnvelopeobjectcannotbeusedtosendthee-mailmessagesitcreates;usersmustmanuallysendthee-mailmessages.

YoucanalsousetheShowMailItemmethodoftheUIobjecttoprogrammaticallycreatee-mailmessages.

Page 228: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheMailEnvelopeobjectTheMailEnvelopeobjectisaccessedthroughtheMailEnvelopepropertyoftheWindowobject.

InthefollowingexamplefromtheMeetingAgendasampleform,theMailEnvelopepropertyoftheWindowobjectisusedtosetareferencetotheMailEnvelopeobjectthatisassociatedwiththecurrentlyactivewindow.ThecodethenusestheMailEnvelopeobjecttocreateacustome-mailmessage.

functionSendMeetingAgendaBtn::OnClick(oEvent){varrgRecipients=newArray();varxmlRecipients=getNodeList("/mtg:meetingAgenda/mtg:attendees/mtg:attendee/mtg:emailAddressPrimary");varxmlRecipient;

while(xmlRecipient=xmlRecipients.nextNode())rgRecipients.push(xmlRecipient.text);

try{varoEnvelope=Application.ActiveWindow.MailEnvelope; oEnvelope.Subject=getNode("/mtg:meetingAgenda/mtg:subject").text;oEnvelope.To=rgRecipients.join(";");oEnvelope.Visible=true;}catch(ex){XDocument.UI.Alert(ex.description);}}

Page 229: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 230: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

MathObject

Providesseveralmath-relatedmethodsthatcanbeusedinMicrosoftOfficeInfoPath2003forms.

Page 231: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsetheMathpropertyoftheUtilobjecttoretunaMathobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 232: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheMathobjectTheMathobjectcontainsthefollowingmethods:

Function DescriptionAvg Returnstheaveragevalueofallthenumericalelementsina

nodeset.Eval Returnsthesetofresultscalculatedwhentheexpressionis

appliedtoeachsetofelementsinthecontext.Max Returnsthelargestvalueofallthenumericalelementsina

nodeset.Min Returnsthesmallestvalueofallthenumericalelementsina

nodeset.Nz Replacesemptyvaluesinthespecifiednodelistwith"0"

(zero).

Page 233: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

MergeEventObject

AneventobjectthatisusedduringanOnMergeRequestevent.TheMergeEventobjectprovidespropertiesandmethodsthatcanbeusedduringanOnMergeRequesteventtoprogrammaticallyinteractwithaform'sunderlyingXMLdocumentandtodeterminemergepropertiessuchasthenumberoffilesbeingmerged.

Page 234: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksDuringasinglemergeformsoperation,multipleOnMergeRequesteventswilloccur.OneOnMergeRequesteventwilloccurforeachfilebeingmerged.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 235: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheMergeEventobjectTheMergeEventobjectispassedasaparametertotheOnMergeRequesteventofanInfoPathform.Thepropertiesthatitprovidesareavailableonlyduringthisevent.

Page 236: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theDOMpropertyandReturnStatuspropertyoftheMergeEventobjectandtheImportDOMmethodoftheXDocumentobjectareusedtoimport(merge)aformfromtheOnMergeRequesteventhandler:

functionXDocument::OnMergeRequest(eventObj){XDocument.ImportDOM(eventObj.DOM);

eventObj.ReturnStatus=true;}

Page 237: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SaveEventObject

AneventobjectthatisusedduringanOnSaveRequestevent.TheSaveEventobjectprovidesanumberofpropertiesandmethodsthatcanbeusedduringasaveoperationfromtheOnSaveRequesteventhandlertoprogrammaticallyinteractwithaform'sunderlyingXMLdocument,determinesaveproperties,andperformthesaveoperation.

Page 238: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 239: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheSaveEventsobjectTheSaveEventobjectispassedasaparametertotheOnSaveRequesteventofanInfoPathform.Thepropertiesthatitprovidesareavailableonlyduringthisevent.Thisobjectexpireswhenthesaveeventexpiressoitmaynotbestoredandusedoutsideofthescopeofthesaveevent.

Page 240: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theReturnStatuspropertyandthePerformSaveOperationmethodoftheSaveEventobjectareusedtoperformastandardInfoPathsaveoperation:

functionXDocument::OnSaveRequest(eventObj){eventObj.PerformSaveOperation();eventObj.ReturnStatus=true;}

Page 241: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 242: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SharepointListAdapterObject

RepresentsaconnectiontoaSharePointlistordocumentlibrary.TheSharePointListAdapterobjectrepresentstheOfficeInfoPath2003dataadapterforretrievingdatafromaSharePointlistordocumentlibrary.

Page 243: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 244: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheSharepointListAdapterObjectForasecondarydatasource,theSharePointListAdapterobjectisaccessiblethroughtheQueryAdapterpropertyofadataadapterobject.DataadapterobjectsareaccessiblethroughtheDataAdapterspropertyoftheXDocumentobject.

TheSharepointListAdapterobjectcontainsthefollowingproperties:

Property DescriptionName ReturnsthenameoftheSharepointListAdapter

object.QueryAllowed Aread-onlypropertyoftypeBooleanthatcorresponds

tothequeryAllowedattributeintheformdefinitionfile(.xsf).AlwaysreturnsTruefortheSharepointListAdapterobject.

SiteUrl Aread-onlypropertyreturningtheUniformResourceLocator(URL)oftheSharePointsitethatthisadaptercanqueryfrom.

SubmitAllowed CorrespondstothesubmitAllowedattributeintheformdefinitionfile(.xsf).AlwaysreturnsFalsefortheSharepointListAdapterobject.

TheSharepointListAdapterobjectcontainsthefollowingmethods:

Method DescriptionQuery ReadsdatafromtheSharepointListAdapterobject.Submit BecausetheSharepointListAdapterobjectisavailablefor

receivingdataonly,thismethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

Page 245: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,areferencetotheSharePointListAdapterobjectisaccessedthroughtheQueryAdapterpropertyofadataadapterobjectbypassingthenameofthedataadapterobjecttotheItempropertyoftheDataAdapterscollection:

varobjSPLAdapter;objSPLAdapter=XDocument.DataAdapters("Announcements").QueryAdapter;

Afterthereferencehasbeenset,youcanusethemethodsoftheSharePointListAdapterobjectasshowninthefollowingexample,whichrequeriestheSharePointlistorlibrarytoupdatetheDOMpropertyofthedataadapterobject:

objSPLAdapter.Query();

Page 246: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 247: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignatureObject

Representsadigitalsignaturethathasbeenaddedtoaformorsetofsigneddatainaform.

Page 248: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 249: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheSignatureobjectUsetheItempropertyoftheSignaturescollectiontoreturnaSignatureobject.

TheSignatureobjectcontainsthefollowingproperties,whichcanbeusedtoreturninformationaboutadigitalsignature:

Property DescriptionComment Returnsthetextcommentthatwasaddedto

thedigitalsignature.Status Returnsthestatusofthespecifieddigital

signatureSignatureBlockXmlNode ReturnstheXMLnodecorrespondingthe

digitalsignature.Certificate ReturnstheCertificateobjectfortheX.509

digitalcertificatethatwasusedwhensigningaformorasetofsigneddata.

TheSignatureobjectcontainsthefollowingmethod:

Method DescriptionSign WritestheXMLdigitalsignatureblockandcomputesthe

cryptographichashforthesigneddata.

Page 250: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 251: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignedDataBlockObject

RepresentsasetofsigneddatainaMicrosoftOfficeInfoPath2003form.TheSignedDataBlockobjectprovidesanumberofpropertiesandonemethodthatcanbeusedtoprogrammaticallyinteractwithasetofsigneddata.

Page 252: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 253: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheSignedDataBlockobjectTheSignedDataBlockobjectcontainsthefollowingread-onlyproperties:

Property DescriptionXPath ReturnstheXPathexpressionofthe

setofsigneddatarepresentedbytheSignedDataBlockobject.

Name ReturnsthenameoftheSignedDataBlock.

Caption ReturnsthefriendlynameoftheSignedDataBlock.

SignatureRelation ReturnstherelationamongmultiplesignaturesontheSignedDataBlock.

Signatures ReturnsacollectionofthesignaturesofaSignedDataBlock.

XPathNamespaceDeclarations ReturnsthenamespacedefinitionsfortheSignedDataBlock.

SignatureContainer ReturnstherootXMLnodeofthesub-treethatcontainsthesignature(s).

TheSignedDataBlockobjectcontainsthefollowingmethod:

Method DescriptionSign InvokestheDigitalSignaturesdialogboxtoaddadigital

signaturetotheSignedDataBlocksectionoftheform.

Page 254: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 255: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignEventObject

AneventobjectthatisusedduringtheOnSignevent.

Page 256: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 257: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheSignEventobjectUsetheSignedDataBlockpropertyoftheSignEventObjectobjecttodeterminewhichsigneddatablockistriggeringtheOnSignevent.TheOnSigneventisraisedforafullytrustedformtemplateonly.

Page 258: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSignEventobjectisusedtoaddasignatureandtimestamptoaSignedDataBlockobject:

[InfoPathEventHandler(EventType=InfoPathEventType.OnSign)]publicvoidOnSign(SignEvente){Signaturesignature=e.SignedDataBlock.Signatures.Create(); signature.Sign();

//Countersignthesignaturewithatrustedtimestamp.

//GettheXMLnodestoringthesignatureblock. IXMLDOMNodeoNodeSig=signature.SignatureBlockXmlNode; IXMLDOMNodeoNodeSigValue=oNodeSig.selectSingleNode(".//*[local-name(.)=’signatureValue’]"); //Gettimestampfromtimestampservice(fictitious). MyTrustedTimeStampingServices=newMyTrustedTimeStampingService(); stringstrVerifiedTimeStamp=s.AddTimeStamp(oNodeSigValue.text); //Addthevaluereturnedfromthetimestampingservicetothe //unsignedpartofthesignatureblock. IXMLDOMNodeoNodeObj=oNodeSig.selectSingleNode(".//*[local-name(.)=’Object’]"); IXMLDOMNodeoNode=oNodeObj.cloneNode(false); oNode.text=strVerifiedTimeStamp; oNodeObj.parentNode.appendChild(oNode);

e.ReturnStatus=true;}

Page 259: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 260: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SolutionObject

Solution

CorrespondstoaMicrosoftOfficeInfoPath2003formtemplate.TheSolutionobjectimplementspropertiesforgettinginformationaboutaformtemplate,includingitsversionnumber,theUniformResourceLocator(URL)ofitsextractedformfiles,theURLitwasloadedfrom,andanXMLDocumentObjectModel(DOM)containingitsformdefinition(.xsf)file.

Page 261: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheSolutionobjectisaccessedthroughtheSolutionpropertyoftheXDocumentobject.

Page 262: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheSolutionobjectInthefollowingexample,areferenceissettotheSolutionobject,thenthecodegetsthenameofthepersonwhoauthoredtheformfromthe.xsfusingtheDOMpropertyoftheSolutionobject.Atestisthenmadetodetermineifthereisanauthorvalue,andtheresultsaredisplayedinamessagebox.

functionSolutionInfo::OnClick(eventObj){varobjSolution=XDocument.Solution;varstrSolutionVersion=objSolution.Version;varobjAuthorNode=objSolution.DOM.selectSingleNode("xsf:xDocumentClass/@author");varstrAuthorText;

if(objAuthorNode!=null)strAuthorText=objAuthorNode.text;elsestrAuthorText="Authornotavailable.";

XDocument.UI.Alert("Version:"+strSolutionVersion+"\nAuthor:"+strAuthorText);}

FormoreinformationaboutusingtheSolutionobject,seeAccessingapplicationdata.

Page 263: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 264: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TaskPaneObject

TaskPanes TaskPane

RepresentsataskpaneinaMicrosoftOfficeInfoPath2003formthatisassociatedwithawindow.TheTaskPaneobjectprovidesanumberofpropertiesforworkingwiththeInfoPathbuilt-intaskpanes,andtheHTMLTaskPaneobjectinheritsthosepropertiesandmethodsforworkingwithacustomtaskpane.

Page 265: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThepropertiesandmethodsthatareavailableforanInfoPathtaskpanearedeterminedbythetypeoftaskpanethatyouareworkingwith.IftheTypepropertyoftheTaskPaneobjectreturns0,thetaskpaneisacustomtaskpaneandthepropertiesandmethodsthatareavailableareprovidedbytheHTMLTaskPaneobject.IftheTypepropertyreturnsanyothervalue,thetaskpaneisabuilt-intaskpaneandthepropertiesareprovidedbytheTaskPaneobjectdirectly.

NoteTheTypepropertyisbasedontheXdTaskPaneTypeenumeration.TheseenumeratedvaluesarealsousedasargumentstotheItempropertyoftheTaskPanescollectionforreturningareferencetoaspecifiedtypeoftaskpane.

Page 266: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheTaskPaneobjectInthefollowingexamplefromtheUserInterfacedevelopersampleform,theItempropertyoftheTaskPanescollectionisusedtosetaglobalreferencetotheTaskPaneobjectthatrepresentsthecustomtaskpane.ThecodethencallsascriptingfunctiondefinedintheHTMLcodeofthecustomtaskpaneusingtheHTMLDocumentpropertyoftheHTMLTaskPaneobject,whichisinheritedbytheTaskPaneobject.

functionSetTaskPaneState(){

//EnsureViewhasloadedbeforetryingtoaccessthetaskpane.if(XDocument.View){//Getareferencetothecustomtaskpane.Itisalwaysthe0-th//taskpaneintheTaskPanescollection.if(gobjTaskPane==null)gobjTaskPane=XDocument.View.Window.TaskPanes.Item(0);

//Ensurethatthetaskpaneiscompletelyloaded.if(gobjTaskPane.HTMLDocument.readyState=="complete"){varstrTaskPaneViewId="TP_"+XDocument.View.Name.replace(/\W+/g,"");

//CallascriptfunctiondefinedinthetaskpaneHTMLpage.gobjTaskPane.HTMLDocument.parentWindow.SelectView(strTaskPaneViewId);}}}

Page 267: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UIObject

UI

RepresentsvarioususerinterfacecomponentsthatcanbeusedinaMicrosoftOfficeInfoPath2003form.TheUI(userinterface)objectprovidesanumberofmethodsfordisplayingcustomandbuilt-indialogboxes.

Page 268: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheUIobjectisusedtoprogrammaticallydisplayvarioustypesofdialogboxestousersastheyfilloutaform.ItisnotusedformodifyingtheInfoPathuserinterface.

Page 269: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheUIobjectTheUIobjectisaccessedthroughtheUIpropertyoftheXDocumentobject.

TheUIobjectprovidestheAlertmethod,whichisusedtodisplayasimplemessageboxwithsomecustomtext,asshowninthefollowingexample:

XDocument.UI.Alert("Custommessagetextgoeshere.");

Oneofthebuilt-inInfoPathdialogboxesthattheUIobjectcandisplayistheDigitalSignaturesdialogbox;thisdialogboxcanbedisplayedtotheuserbyusingtheShowSignatureDialogmethod,asfollows:

XDocument.UI.ShowSignatureDialog();

NoteTheShowSignatureDialogmethodcanbeusedonlyinformsthathavebeenenabledfordigitalsigning.Themethodwillreturnanerrorifusedinaformthatisnotenabledfordigitalsigning.

FormoreinformationaboutusingtheUIobject,seeDisplayingalertsanddialogboxes.

Page 270: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UserObject

Providesmethodsthatcanbeusedtoreturninformationaboutthecurrentuser.

Page 271: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 272: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheUserobjectUsetheUserpropertyoftheApplicationobjecttoreturnaUserobject.

TheUserobjectcontainsthefollowingmethods:

Method DescriptionIsCurrentUser ReturnsTrueifthecurrentusermatchesthespecified

username.IsUserMemberOfReturnsTrueifcurrentuserisamemberofthe

specifiedgroup.

Page 273: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 274: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UtilObject

ProvidesutilitymethodsthatcanbeusedwithMicrosoftOfficeInfoPath2003forms.

Page 275: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 276: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheUtilobjectUsetheUtilpropertyoftheXDocumentobjecttocreateaUtilobject.

TheUtilobjectcontainsthefollowingproperties:

Property DescriptionDate UsethispropertytoreturnaDateobject,whichprovides

severaldate-relatedmethods.Math UsethispropertytoreturnaMathobject,whichprovides

severalmath-relatedmethods.

TheUtilobjectcontainsthefollowingmethod:

Method DescriptionMatch Indicateswhetherastringmatchesaspecifiedpattern.

Page 277: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 278: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

VersionUpgradeEventObject

VersionUpgradeEvent

AneventobjectthatisusedduringaMicrosoftOfficeInfoPath2003versionupgradeevent.TheVersionUpgradeEventobjectprovidesanumberofpropertiesthatcanbeusedwithinaversionupgradeeventtoprogrammaticallyinteractwithaform'sunderlyingXMLdocument,determinetheversionnumbersoftheformandformtemplate,andprovidearesponseindicatingthesuccessoftheversionupgradeprocess.

Page 279: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheVersionUpgradeEventobjectispassedasaparametertotheOnVersionUpgradeeventofanInfoPathform.Thepropertiesthatitprovidesareavailableonlyduringthisevent.

Page 280: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheVersionUpgradeEventobjectInthefollowingexample,theDocumentVersionandSolutionVersionpropertiesoftheVersionUpgradeEventobjectareusedtodisplaytheversionnumbersoftheformandformtemplate:

functionXDocument::OnVersionUpgrade(eventObj){XDocument.UI.Alert("Theformversion:"+eventObj.DocumentVersion+"\nTheformtemplateversion:"+eventObj.SolutionVersion);eventObj.ReturnStatus=true;}

FormoreinformationaboutusingtheVersionUpgradeEventobject,seeRespondingtoformevents.

Page 281: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ViewObject

View

RepresentsaviewwithinaMicrosoftOfficeInfoPath2003form.TheViewobjectprovidesanumberofpropertiesandmethodsthatcanbeusedtoprogrammaticallyinteractwithanInfoPathview,includingmethodsforselectingdatacontainedintheview,switchingfromoneviewtoanother,synchronizingtheviewwithaform'sunderlyingXMLdocument,andexecutinganInfoPatheditingaction.

Page 282: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksInfoPathformscancontainoneormoreviews,andoneviewisalwaysdefinedasthedefaultview.WhenyouworkwithaviewusingtheViewobject,youareaccessingthecurrentlyactiveview.

NoteTheInfoPathobjectmodelalsoprovidestheViewInfoscollection,whichcanbeusedtogetinformationaboutalloftheviewsimplementedinaform.

Page 283: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheViewobjectTheViewobjectisaccessedthroughtheViewpropertyoftheXDocumentobject.Forexample,thefollowingcodesetsareferencetoaform'scurrentlyactiveview:

varobjView;

objView=XDocument.View;

Tochangethecurrentlyactiveview,youcanusetheSwitchViewmethodoftheViewobjectasfollows:

XDocument.View.SwitchView("View2");

Toforceanupdateofaviewbasedonchangesinaform'sunderlyingXMLdocument,youcanusetheForceUpdatemethodoftheViewobject,asshownhere:

XDocument.View.ForceUpdate();

FormoreinformationaboutusingtheViewobject,seeWorkingwithviews.

Page 284: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ViewInfoObject

ViewInfos ViewInfo

ContainsdescriptiveinformationaboutaviewwithinaMicrosoftOfficeInfoPath2003form.

Page 285: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheViewInfoobjectprovidespropertiesthatcanbeusedtogetthenameofaviewanddeterminewhetheraviewisthedefaultviewoftheform.TheViewInfoobjectisaccessiblethroughtheViewInfospropertyoftheXDocumentobject.

NoteToworkwiththeviewprogrammatically,usetheViewobject.

Page 286: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheViewInfoobjectInthefollowingexample,theIsDefaultpropertyoftheViewInfoobjectisusedtodeterminewhetheraviewisthedefaultviewoftheform.ThenthecodeusestheNamepropertyoftheViewInfoobjecttodisplaythenameofthedefaultviewinamessagebox.

varobjViewInfos;

//SetareferencetotheViewInfoscollection.objViewInfos=XDocument.ViewInfos;

//Determinethedefaultviewanddisplaya//messageboxwithitsname.for(i=0;i<objViewInfos.Count;i++){if(objViewInfos(i).IsDefault)XDocument.UI.Alert("Thedefaultviewis:"+XDocument.ViewInfos(0).Name);}

Page 287: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 288: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

WebServiceAdapterObject

WebServiceAdapter

RepresentsaconnectiontoanXMLWebservice.TheWebServiceAdapterobjectisatypeofMicrosoftOfficeInfoPath2003dataadapterthatcontainsalltheinformationnecessaryforretrievingdatafromandsubmittingdatatoanexternaldatasource.

Page 289: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheWebServiceAdapterobjectprovidespropertiesthatcanbeusedtogetandsetinformationaboutthedataadapter'sinputandoperationstrings.ItalsoprovidesapropertyforgettingtheUniformResourceLocator(URL)oftheWebServicesDescriptionLanguage(WSDL)fileoftheXMLWebservice.

Page 290: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheWebServiceAdapterobjectForsecondarydatasources,theWebServiceAdapterobjectisaccessiblethroughtheQueryAdapterpropertyoftheDataObjectobject,andDataObjectobjectsareaccessiblethroughtheDataObjectspropertyoftheXDocumentobject.

IfaWebserviceisusedastheprimarydatasourceforaform,theWebServiceAdapterobjectisaccessiblethroughtheQueryAdapterpropertyoftheXDocumentobject.

Inthefollowingexample,areferencetotheWebServiceAdapterobjectissetbyusingtheQueryAdapterpropertyoftheDataObjectobjectbypassingthenameoftheDataObjectobjecttotheItempropertyoftheDataObjectscollection:

varobjWSAdapter;

objWSAdapter=XDocument.DataObjects("GetCityList").QueryAdapter;

Afterthereferencehasbeenset,youcanusethepropertiesoftheWebServiceAdapterobjectasshowninthefollowingexample,whichsetsareferencetotheXMLnodereturnedbytheInputproperty:

varobjInputNode;

objInputNode=XDocument.DataObjects("GetCityList").QueryAdapter.Input;

Notethatinthiscase,theQueryAdapterpropertywasusedtoaccesstheInputpropertyoftheWebServiceAdapterobject.

FormoreinformationaboutusingtheWebServiceAdapterobject,seeAccessingexternaldatasources.

TheWebServiceAdapterobjectcontainsthefollowingproperties:

Property Description

Page 291: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ErrorsLocation ApropertyoftypeIXMLDOMNodethatsetsorretrievestheerrorsnodeunderwhichtheWebServiceAdapterobjectwillwritetheerrordetailsreturnedbytheWebservice.Theinitialvalueisnull.

Input SetsorretrievesastringthatcontainsthesourceXMLoftheinputelementcontainedintheformdefinitionfile(.xsf).

Name Aread-onlypropertyoftypeStringthatreturnsthenameoftheWebServiceAdapterobject.

Operation SetsorretrievesastringthatcontainsthesourceXMLoftheoperationelementcontainedintheformdefinition(.xsf)file.

OutputLocation ApropertyoftypeIXMLDOMNodethatsetsorretrievestheoutputnodeunderwhichtheWebServiceAdapterobjectwillcopythereturnedXML.

QueryAllowed Aread-onlypropertyoftypeBooleanthatcorrespondstothequeryAllowedattributeintheformdefinition(.xsf)file.

SubmitAllowed Aread-onlypropertyoftypeBooleanthatcorrespondstothesubmitAllowedattributeintheformdefinitionfile(.xsf).

Timeout ApropertyoftypeLongthatsetsorretrievesthelengthoftime,inseconds,fortheWebServiceAdapterobjecttotime-outonsubsequentrequests.Thedefaultvalueis30seconds.

WSDLURL Aread-onlypropertythatreturnsastringthatcontainstheUniformResourceLocator(URL)oftheWebServicesDescriptionLanguage(WSDL)filefortheWebserviceassociatedwiththeWebServiceAdapterobject.

TheWebServiceAdapterobjectcontainsthefollowingmethods:

Method PropertyGenerateDataSetDiffGram ReturnsanADO.NetDataSetcontainingan

inlineschemadescribingthedataandthe

Page 292: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DiffGramoftheDataSet.TheDiffGramfortheinputdataDomisgenerated,usingthesiblingnodeOriginalDatatocomputethedifferencebetweentheOriginalDataandtheinputdataDom.

Query ExecutestheQuerymethodontheWebServiceAdapterobject.FailsiftheQueryAllowedpropertyisFalse.

Submit ExecutestheSubmitmethodontheWebServiceAdapterobject.FailsiftheSubmitAllowedpropertyisFalse.

Page 293: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 294: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

WindowObject

Windows Window

RepresentsawindowthatisusedintheMicrosoftOfficeInfoPath2003application.WindowobjectsrepresentthetwotypesofwindowsthatareusedintheInfoPathapplication:theeditingwindowthatisusedastheformareawhenauserfillsoutaform,andthedesigningwindowthatisusedasthedesignmodewhenauserdesignsaform.

Page 295: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheWindowobjectprovidesanumberofpropertiesandmethodsthatcanbeusedtoprogrammaticallyinteractwithInfoPathwindows,includingtheabilitytoactivateorcloseawindowandtheabilitytointeractwiththetaskpanesandcommandbarsthattheycontain.TheWindowobjectalsoprovidesapropertyforaccessingtheform'sunderlyingXMLdocumentthatisassociatedwiththewindow.

NoteSomepropertiesoftheWindowobjectareonlyavailablewhenusingtheeditingwindowtype;theywillreturnanerrorifusedwiththedesigningwindowtype.

Page 296: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheWindowobjectTheWindowobjectsofanInfoPathformareaccessedthroughtheItempropertyoftheWindowscollection.ThetypeofwindowcanbedeterminedbytheTypepropertyoftheWindowobject.

YoucanaccessthecurrentlyopenwindowdirectlybyusingtheActiveWindowpropertyoftheApplicationobject,withoutgoingthroughtheWindowscollection.YoucanalsoaccesstheWindowobjectthatisassociatedwithaviewbyusingtheWindowpropertyoftheViewobject.

Inthefollowingexample,implementedasanOnClickeventhandlerforabuttoncontrol,theActiveWindowpropertyisusedtosetareferencetothecurrentwindow.Thenthecodechecksthewindowtype;ifitistheeditingwindowtype,itdisplaysthenumberoftaskpanescontainedinthewindowinamessagebox.

functionWindowObject::OnClick(eventObj){

varobjWindow;//Setareferencetothecurrentwindow.objWindow=Application.ActiveWindow;//Checkthatthewindowisaneditingwindowtype.if(objWindow.Type==0){//Displaythenumberoftaskpanesinthewindow.XDocument.UI.Alert("Numberoftaskpanes:"+objWindow.TaskPanes.Count);}objWindow=null;}

Page 297: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

FormoreinformationaboutusingtheWindowobject,seeWorkingwithformwindows.

Page 298: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 299: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentObject

XDocuments XDocument

RepresentstheunderlyingXMLdocumentofaMicrosoftOfficeInfoPath2003form.

Page 300: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheXDocumentobjectisakeyobjectintheInfoPathobjectmodelthatprovidesproperties,methods,andeventsthatcanbeusedtoprogrammaticallyinteractwithandmanipulatethesourceXMLdataofaform.

NoteTheXDocumentobjectisembeddedintheInfoPathscriptengine.WhiletheXDocumentobjectcanbeaccessedusingtheXDocumentscollection,inmostcasesyouwillaccessitdirectly,withoutgoingthroughthecollection.

Page 301: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheXDocumentobjectThesourceXMLdataofaformtakestheformofanXMLDocumentObjectModel(DOM),whichisaccessedthroughtheDOMpropertyoftheXDocumentobject.TheXDocumentobjectalsoprovidesanumberofpropertiesthatcanbeusedtogetinformationabouttheformanditsunderlyingXMLdocument.Forexample,thefollowingcodecheckstoseewhetherdataintheformhasbeenchangedbyusingtheIsDirtyproperty:

if(XDocument.IsDirty)XDocument.UI.Alert("Formhasbeenchanged.");elseXDocument.UI.Alert("Formhasnotbeenchanged.");

InadditiontoinformationabouttheformanditsunderlyingXMLdocument,theXDocumentobjectprovidesanumberofmethodsthatcanbeusedontheform,suchasprinting,saving,andsubmitting.Italsoprovidesanumberofeventsthatcanbeusedtorespondtovariousactionsthatoccurattheformlevel,suchasloadingofaform,switchingviews,oramergeoperation.

Page 302: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AccessingtheXDocumentobjectTheXDocumentobjectcanbeaccessedinavarietyplaceswithintheInfoPathobjectmodel.ThefollowingtablesummarizesthelocationswheretheXDocumentobjectisavailable.

Name DescriptionXDocumentscollection

AccessedfromtheApplicationobject.ProvidestheItempropertyforaccessingthetheXDocumentobjectsthatitcontains.

DataDOMEventobject ProvidesanXDocumentpropertyforaccessingthesourceXMLdataduringanXMLDOMchange.

DocActionEventobject

ProvidesanXDocumentpropertyforaccessingthesourceXMLdataduringabuttonclickintheformarea.

DocEventobject ProvidesanXDocumentpropertyforaccessingthesourceXMLdataduringaswitchvieworformmergeoperation.

DocReturnEventobject

ProvidesanXDocumentpropertyforaccessingthesourceXMLduringtheloadingorsubmissionofaform.

VersionUpgradeEventobject

ProvidesanXDocumentpropertyforaccessingthesourceXMLduringduringtheversionupgradeoperation.

Windowobject ProvidesanXDocumentpropertyforaccessingtheXDocumentobjectassociatedwiththewindow.

NoteFormoreinformationaboutusingtheXDocumentobject,seeAccessingformdata.

Page 303: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 304: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XMLFileAdapterObject

XMLFileAdapter

RepresentsaconnectiontoanXMLfile.TheXMLFileAdapterobjectisatypeofMicrosoftOfficeInfoPath2003dataadapterthatcontainsalltheinformationnecessaryforretrievingandsubmittingdatatoanexternaldatasource.

Page 305: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheXMLFileAdapterobjectprovidestheFileURLproperty,whichcanbeusedgetorsettheUniformResourceLocator(URL)oftheXMLfilethatisbeingusedanexternaldatasource.

Page 306: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsingtheXMLFileAdapterobjectForsecondarydatasources,theXMLFileAdapterobjectisaccessiblethroughtheQueryAdapterpropertyoftheDataObjectobject,andDataObjectobjectsareaccessiblethroughtheDataObjectspropertyoftheXDocumentobject.

Inthefollowingexample,areferencetotheXMLFileAdapterobjectissetbyusingtheQueryAdapterpropertyoftheDataObjectobjectbypassingthenameoftheDataObjectobjecttotheItempropertyoftheDataObjectscollection:

varobjXMLFileAdapter;

objXMLFileAdapter=XDocument.DataObjects("GetXMLCityList").QueryAdapter;

FormoreinformationaboutusingtheXMLFileAdapterobject,seeAccessingexternaldatasources.

Page 307: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ActiveProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetherthewindowassociatedwiththeWindowobjectistheactivewindow.

expression.Active

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

Page 308: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 309: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTodesignateawindowastheactivewindow,usetheActivatemethodoftheWindowobject.

Page 310: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theActivepropertyoftheWindowobjectisusedtodeterminewhetherthefirstwindowcontainedintheWindowscollectionistheactivewindow:

if(Application.Windows(0).Active){XDocument.UI.Alert("Thewindowisactive.");}

Page 311: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ActiveWindowProperty

Aread-onlypropertythatreturnsareferencetoaWindowobjectthatrepresentsthecurrentlyactivewindow.ThetypeofwindowreturnedisbasedontheXdWindowTypeenumeration.

expression.ActiveWindow

expressionRequired.AnexpressionthatreturnstheApplicationobject.

Page 312: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 313: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsingtheActiveWindowproperty,youcangainimmediateaccesstothewindowthatiscurrentlybeingviewedbytheuser,andthenusethepropertiesandmethodsoftheWindowobjectthatitreturns.

Page 314: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheMeetingAgendasampleform,theActiveWindowpropertyisusedtogainaccesstotheMailEnvelopepropertyoftheWindowobjectthatreturnsaMailEnvelopeobject.

varoEnvelope=Application.ActiveWindow.MailEnvelope;

oEnvelope.Subject=getNode("/mtg:meetingAgenda/mtg:subject").text;oEnvelope.To=rgRecipients.join(";");oEnvelope.Visible=true;

Page 315: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttachmentFileNameProperty

Returnsorsetsastringthatrepresentsthefilenametobeusedforthecurrentformwhentheformisattachedtothee-mailmessageofanEmailAdapterobject.

expression.AttachmentFileName

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

Page 316: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 317: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThe".xml"filenameextensionwillbeappendedtothestringifitisnotalreadyincluded.

IftheAttachmentFileNamepropertyissettonull,theformwillnotbeattachedtothee-mailmessage.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 318: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThisexampleshowshowtousetheAttachmentFileNamepropertyofaninstanceoftheEmailAdapterobjecttochangethenameoftheformwhenitisattachedtothee-mailmessagebeforetheEmailAdapterobjectissubmitted:

objEmailAdapter.AttachmentFileName=strName+"–"+strDate+".xml";

Page 319: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

BCCProperty(EmailAdapterObject)

ReturnsorsetsastringthatrepresentstheBCCrecipientsofane-mailmessageassociatedwithanEmailAdapterobject.

expression.BCC

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

Page 320: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 321: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevaluemustbeasemicolon-delimitedstringthatcanberesolvedintoalistofvalide-mailaddressesbytheuser'se-mailclient.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 322: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThisexampleshowshowtousetheBCCpropertyofaninstanceoftheEmailAdapterobjecttochangetheBCCrecipientsbeforetheEmailAdapterissubmitted:

objEmailAdapter.BCC=oEmailAdapter.BCC+";[email protected]";

Page 323: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

BCCProperty(Index)

TheBCCpropertysetsorretrievesastringcontainingtheblindcarboncopy(BCC)valueforane-mailmessage.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaBCCpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheBCCproperty.

BCCpropertyasitappliestotheEmailAdapterobject.

BCCpropertyasitappliestotheMailEnvelopeobject.

Page 324: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

BCCProperty(MailEnvelopeObject)

Setsorretrievesastringcontainingtheblindcarboncopy(BCC)valueusedintheMailEnvelopeobjectthatisassociatedwithaWindowobject.

expression.BCC

expressionRequired.AnexpressionthatreturnsareferencetotheMailEnvelopeobject.

Page 325: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 326: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevaluessetfortheBCCpropertyshouldbeastringofvalide-mailaddresses.Youcanspecifymultiplee-mailaddressesbyusing";"betweeneachofthem,asshowninthefollowingexample:

objEmail.BCC="[email protected];[email protected]"

Page 327: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theBCCpropertyoftheMailEnvelopeobjectisusedtosettheBCCvalueofacustome-mailmessage:

functionCreateMailEnvelope::OnClick(eventObj){varobjEmail;

objEmail=Application.ActiveWindow.MailEnvelope;objEmail.To="[email protected]";objEmail.CC="[email protected]";objEmail.BCC="[email protected]";objEmail.Subject="Teste-mailmessage";objEmail.Visible=true;objEmail=null;}

Page 328: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CaptionProperty(Index)

ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaCaptionpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheCaptionproperty.

CaptionpropertyasitappliestotheSignedDataBlockobject.

CaptionpropertyasitappliestotheWindowobject.

Page 329: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CaptionProperty(SignedDataBlockObject)

Aread-onlypropertythatreturnsthefriendlynameoftheSignedDataBlockobject.

expression.Caption

expressionRequired.AnexpressionthatreturnsareferencetotheSignedDataBlockobject.

Page 330: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 331: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 332: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CaptionProperty(WindowObject)

Aread/writepropertythatreturnsorsetsthecaptiontextforthewindowrepresentedbytheWindowobject.

expression.Caption

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

Page 333: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 334: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 335: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksWhensettingthecaptiontextforawindow,thecaptionwillalwaysbefollowedby"-MicrosoftOfficeInfoPath2003".

Page 336: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theCaptionpropertyisusedtosetthecaptiontextoftheactivewindow.

varstrCaption="MyCaption";

Application.ActiveWindow.Caption=strCaption;

Page 337: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CCProperty(EmailAdapterObject)

Returnsorsetsastringthatrepresentsthecarboncopy(CC)recipientsforthee-mailmessageassociatedwithanEmailAdapterobject.

expression.CC

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

Page 338: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 339: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevaluemustbeasemicolon-delimitedstringthatcanberesolvedintoalistofvalide-mailaddressesbytheuser'se-mailclient.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 340: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThisexampleshowshowtousetheCCpropertyofaninstanceoftheEmailAdapterobjecttochangetheCCrecipientsbeforetheEmailAdapterobjectissubmitted:

objEmailAdapter.CC=oEmailAdapter.CC+";[email protected]";

Page 341: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CCProperty(MailEnvelopeObject)

Setsorretrievesastringcontainingthecarboncopy(CC)valueusedintheMailEnvelopeobjectthatisassociatedwithaWindowobject.

expression.CC

expressionRequired.AnexpressionthatreturnsareferencetotheMailEnvelopeobject.

Page 342: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 343: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevaluessetfortheCCpropertyshouldbeastringofvalide-mailaddresses.Youcanspecifymultiplee-mailaddressesbyusing";"betweeneachofthem,asshowninthefollowingexample:

objEmail.CC="[email protected];[email protected]"

Page 344: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theCCpropertyoftheMailEnvelopeobjectisusedtosettheCCvalueofacustome-mailmessage:

functionCreateMailEnvelope::OnClick(eventObj){varobjEmail;

objEmail=Application.ActiveWindow.MailEnvelope;objEmail.To="[email protected]";objEmail.CC="[email protected]";objEmail.BCC="[email protected]";objEmail.Subject="Teste-mailmessage";objEmail.Visible=true;objEmail=null;}

Page 345: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CCPropety(Index)

TheCCpropertysetsorretrievesastringcontainingthecarboncopy(CC)valueforane-mailmessage.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaCCpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheCCproperty.

CCpropertyasitappliestotheEmailAdapterobject.

CCpropertyasitappliestotheMailEnvelopeobject.

Page 346: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 347: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CertificateProperty

Aread-onlypropertythatreturnstheCertificateobjectfortheX.509digitalcertificatethatwasusedtosignaformorasetofsigneddatainaform.

expression.Certificate

expressionRequired.AnexpressionthatreturnsaSignatureobject.

Page 348: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 349: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 350: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 351: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CommandProperty

SetsorretrievestheSQLcommandstringtextforanADOAdapterobject.

expression.Command

expressionRequired.AnexpressionthatreturnsareferencetotheADOAdapterobject.

Page 352: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 353: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheCommandpropertyoftheADOAdapterobjectcontainstheSQLcommandtextthatisusedbytheADOdataadaptertosubmitdatatoandretrievedatafromanActiveXDataObjects/OLEDBexternaldatasource.

NoteTheADOAdapterobjectislimitedtoworkonlywithMicrosoftSQLServerandMicrosoftAccessdatabases.

Page 354: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theCommandpropertyoftheADOAdapterobjectisusedtodisplaytheSQLcommandtextoftheADOdataadapterinamessagebox:

varobjADOAdapter;

objADOAdapter=XDocument.DataObjects("CityList").QueryAdapter;XDocument.UI.Alert("SQLcommandtext:"+objADOAdapter.Command

Page 355: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CommandBarsProperty

Aread-onlypropertythatreturnsareferencetotheMicrosoftOfficeCommandBarscollectionobjectcontainedinthewindowthatisassociatedwiththeWindowobject.

expression.CommandBars

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

Page 356: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 357: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheCommandBarspropertycanbeusedonlybyfullytrustedforms.Ifusedbyaformthatisnotfullytrusted,theCommandBarspropertywillreturna"permissiondenied"error.

Page 358: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theCommandBarspropertyoftheWindowobjectisusedtosetareferencetotheCommandBarscollectionobject:

varobjCommandBars;objCommandBars=Application.ActiveWindow.CommandBars;

Page 359: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 360: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CommentProperty

Aread-onlypropertythatreturnsthetextcommentthatwasaddedtothedigitalsignatureassociatedwithaformorasectionofaform.

expression.Comment

expressionRequired.AnexpressionthatreturnsaSignatureobject.

Page 361: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 362: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 363: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ConditionNameProperty

Aread-onlypropertythatreturnsastringvaluecontainingthenameoftheErrorobject.

expression.ConditionName

expressionRequired.AnexpressionthatreturnsareferencetotheErrorobject.

Page 364: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 365: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheConditionNamepropertyisusedonlyforcustomerrors;itisnotusedforschemavalidation–generatedorsystem-generatederrors.Ifthetypeoferrorisschemavalidationgeneratedorsystemgenerated,theConditionNamepropertywillreturnnull.

Page 366: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theConditionNamepropertyoftheErrorobjectisusedtodisplaythenameofacustomerrorinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errorname:"+objError.ConditionName);

Page 367: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 368: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ConnectionProperty

SetsorretrievestheconnectionstringusedforanADOAdapterobject.

expression.Connection

expressionRequired.AnexpressionthatreturnsareferencetotheADOAdapterobject.

Page 369: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 370: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheConnectionpropertyoftheADOAdapterobjectcontainstheconnectionstringthatisusedbytheADOdataadaptertoconnecttoanActiveXDataObjects/OLEDBexternaldatasource.

NoteTheADOAdapterobjectislimitedtoworkonlywithMicrosoftSQLServerandMicrosoftAccessdatabases.

Page 371: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theConnectionpropertyoftheADOAdapterobjectisusedtodisplaytheconnectionstringoftheADOdataadapterinamessagebox:

varobjADOAdapter;

objADOAdapter=XDocument.DataObjects("CityList").QueryAdapter;XDocument.UI.Alert("Connectionstring:"+objADOAdapter.Connection

Page 372: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ContextProperty

Aread-onlypropertythatreturnsareferencetotheXMLDocumentObjectModel(DOM)nodethatisthenewcontextnodeprovidedbytheDocContextChangeEventobject.

expression.Context

expressionRequired.AnexpressionthatreturnsareferencetotheDocContextChangeEventobject.

Page 373: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 374: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 375: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CountProperty(DataAdaptersCollection)

Aread-onlypropertythatreturnsthenumberofdataadaptersintheDataAdaptersCollectioncollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetoaDataAdaptersCollectioncollection.

Page 376: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 377: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 378: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 379: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CountProperty(DataObjectsCollection)

Aread-onlypropertythatreturnsacountofthenumberofDataObjectobjectscontainedintheDataObjectscollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetotheDataObjectscollection.

Page 380: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 381: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheCountpropertyreturnsalongintegervalue.

Page 382: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theCountpropertyisusedwithinaMicrosoftJScriptforlooptoiteratethroughthecollectionofDataObjectobjectsanddisplayamessageboxindicatingthenameofeachDataObjectobjectassociatedwiththeform:

for(i=0;i<XDocument.DataObjects.Count;i++){XDocument.UI.Alert("DataObjectname:"+XDocument.DataObjects(i).Name);}

Page 383: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 384: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CountProperty(ErrorsCollection)

Aread-onlypropertythatreturnsacountofthenumberofErrorobjectscontainedintheErrorscollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetotheErrorscollection.

Page 385: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 386: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheCountpropertyreturnsalongintegervalue.

Page 387: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theCountpropertyisusedwithinaMicrosoftJScriptforlooptoiteratethroughthecollectionofErrorobjectsanddisplayamessageboxindicatingtheshorterrormessageofeacherror:

for(i=0;i<XDocument.Errors.Count;i++){XDocument.UI.Alert("Errormessage:"+XDocument.Errors(i).ShortErrorMessage);}

Page 388: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CountProperty(Index)

TheCountpropertyreturnsacountofthenumberofobjectscontainedinacollection.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaCountpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheCountproperty.

CountpropertyasitappliestotheDataAdapterscollection.

CountpropertyasitappliestotheDataObjectscollection.

CountpropertyasitappliestotheErrorscollection.

CountpropertyasitappliestotheMergeEventobject.

CountpropertyasitappliestotheSignaturescollection.

CountpropertyasitappliestotheSignedDataBlockscollection.

CountpropertyasitappliestotheTaskPanescollection.

CountpropertyasitappliestotheViewInfoscollection.

CountpropertyasitappliestotheWindowscollection.

CountpropertyasitappliestotheXDocumentscollection.

CountpropertyasitappliestotheXMLNodescollection.

Page 389: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CountProperty(MergeEventObject)

Aread-onlypropertythatreturnsacountofthenumberofformsbeingmergedinamergingoperation.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetoaMergeEventobject.

Page 390: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 391: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheCountpropertycanbeusedincombinationwiththeIndexpropertyoftheMergeEventobjecttodeterminewhenthelastformwasmerged.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 392: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThisexampleshowshowtousetheIndexpropertyalongwiththeCountpropertyofaninstanceoftheMergeEventobjecttodetermineifthecurrentformisthelastformbeingmerged:

varfLast=eventObj.Index+1==eventObj.Count;

Page 393: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CountProperty(SignaturesCollection)

Aread-onlypropertythatreturnsthenumberofSignatureobjectsintheSignaturescollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetoaSignaturescollection.

Page 394: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 395: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 396: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 397: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CountProperty(SignedDataBlocksCollection)

Aread-onlypropertythatreturnsthenumberofSignedDataBlockobjectsintheformtemplate.

expression.Count

expressionRequired.AnexpressionthatreturnsaSignedDataBlockscollection.

Page 398: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 399: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 400: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 401: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CountProperty(TaskPanesCollection)

Aread-onlypropertythatreturnsacountofthenumberofTaskPaneobjectscontainedintheTaskPanescollection.

expression.Count

expressionRequired.ReturnsareferencetotheTaskPanescollection.

Page 402: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 403: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheCountpropertyreturnsalongintegervalue.

Page 404: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theCountpropertyisusedwithinaMicrosoftJScriptforlooptoiteratethroughthecollectionofTaskPaneobjects.ItcheckstheVisiblepropertyofeachTaskPaneobjectandifitisTrue,setsittoFalse.

varobjTaskPanes;

objTaskPanes=XDocument.View.Window.TaskPanes;

for(i=0;i<objTaskPanes.Count;i++){if(objTaskPanes(i).Visible=true)objTaskPanes(i).Visible=false;}

Page 405: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 406: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CountProperty(ViewInfosCollection)

Aread-onlypropertythatreturnsacountofthenumberofViewInfoobjectscontainedintheViewInfoscollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetotheViewInfoscollection.

Page 407: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 408: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheCountpropertyreturnsalongintegervalue.

Page 409: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theCountpropertyisusedwithinaMicrosoftJScriptforlooptoiteratethroughthecollectionofViewInfoobjectsanddisplayamessageboxindicatingthenameofeachviewimplementedintheform:

for(i=0;i<XDocument.ViewInfos.Count;i++){XDocument.UI.Alert("Viewname:"+XDocument.ViewInfos(i).Name);}

Page 410: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 411: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CountProperty(WindowsCollection)

Aread-onlypropertythatreturnsacountofthenumberofWindowobjectscontainedintheWindowscollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetotheWindowscollection.

Page 412: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 413: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheCountpropertyreturnsalongintegervalue.

Page 414: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theCountpropertyisusedwithinaMicrosoftJScriptforlooptoiteratethroughthecollectionofWindowobjectsanddisplayamessageboxindicatingthewindowtypevalue:

for(i=0;i<Application.Windows.Count;i++){XDocument.UI.Alert("Windowtype:"+Application.Windows(i).Type);}

Page 415: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 416: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CountProperty(XDocumentsCollection)

Aread-onlypropertythatreturnsacountofthenumberofXDocumentobjectscontainedintheXDocumentscollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetotheXDocumentscollection.

Page 417: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 418: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheCountpropertyreturnsalongintegervalue.

Page 419: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theCountpropertyoftheXDocumentscollectionisusedwithinaJScriptforlooptoiteratethroughthecollectionofXDocumentobjectsanddisplayamessageboxindicatingtheUniformResourceIdentifier(URI)locationforeachcurrentlyopenform:

for(i=0;i<Application.XDocuments.Count;i++){XDocument.UI.Alert("XDocumentURI:"+Application.XDocuments(i).URI);}

Page 420: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 421: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CountProperty(XMLNodesCollection)

Aread-onlypropertythatreturnsacountofthenumberofXMLDocumentObjectModel(DOM)nodeobjectscontainedintheXMLNodescollection.

expression.Count

expressionRequired.ReturnsareferencetotheXMLNodescollection.

Page 422: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 423: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheCountpropertyreturnsalongintegervalue.

Page 424: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theCountpropertyisusedwithinaMicrosoftJScriptforlooptoiteratethroughthecollectionofXMLDOMnodeobjectsreturnedbytheGetSelectedNodesmethodoftheViewobjectanddisplayamessageboxindicatingthenameofeachXMLDOMnodethatiscontainedintheXMLNodescollection:

varobjXMLNodes;

objXMLNodes=XDocument.View.GetSelectedNodes();

for(i=0;i<objXMLNodes.Count;i++){XDocument.UI.Alert("XMLDOMnodename:"+objXMLNodes(i).nodeName);}

Page 425: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DataAdaptersProperty

Aread-onlypropertythatreturnsareferencetotheDataAdapterscollectionthatisassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.DataAdapters

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 426: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 427: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 428: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theDataAdapterspropertyoftheXDocumentobjectisusedtosetareferencetoadataadaptercalled"Mainquery":

varobjDataAdapter;objDataAdapter=XDocument.DataAdapters("Mainquery");

Page 429: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 430: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DataObjectsProperty

Aread-onlypropertythatreturnsareferencetotheDataObjectscollectionthatisassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.DataObjects

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 431: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 432: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheDataObjectscollectionprovidesprogrammaticaccesstoaform'ssecondarydatasources.EachsecondarydatasourceiscontainedinaDataObjectobjectwithintheDataObjectscollection.

Page 433: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theDataObjectspropertyoftheXDocumentobjectisusedtosetareferencetotheCityListsecondarydatasource:

varobjDataObject;objDataObject=XDocument.DataObjects("CityList");

Page 434: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DateProperty

Aread-onlypropertythatreturnsareferencetotheDateobject.

expression.Date

expressionRequired.AnexpressionthatreturnsareferencetotheUtilobject.

Page 435: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 436: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksYoucanaccessallofthemethodsthattheDateobjectprovidesbyusingtheDateproperty.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 437: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DetailedErrorMessageProperty

SetsorretrievesthestringvaluecontainingthedetailederrormessageofanErrorobject.

expression.DetailedErrorMessage

expressionRequired.AnexpressionthatreturnsareferencetotheErrorobject.

Page 438: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 439: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedetailederrormessageisthelongererrormessagethatuserscanchoosetoviewwhendatavalidationfailsintheirforms.

Page 440: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theDetailedErrorMessagepropertyoftheErrorobjectisusedtodisplaythedetailedmessageofanerrorinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errorname:"+objError.DetailedErrorMessage

Page 441: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DocumentVersionProperty

Aread-onlypropertythatreturnsastringcontainingtheversionnumberofaMicrosoftOfficeInfoPath2003form.

expression.DocumentVersion

expressionRequired.AnexpressionthatreturnsareferencetotheVersionUpgradeEventobject.

Page 442: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 443: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThispropertycanbeusedonlyduringtheOnVersionUpgradeevent.

Page 444: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theDocumentVersionpropertyoftheVersionUpgradeEventobjectisusedtodisplaytheversionnumberofanInfoPathforminamessagebox:

functionXDocument::OnVersionUpgrade(eventObj){XDocument.UI.Alert("Theformversion:"+eventObj.DocumentVersion"\nTheformtemplateversion:"+eventObj.SolutionVersion);eventObj.ReturnStatus=true;}

Page 445: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 446: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DOMProperty(DataObjectObject)

Aread-onlypropertythatreturnsareferencetoanXMLDocumentObjectModel(DOM)thatisassociatedwithaDataObjectobject.

expression.DOM

expressionRequired.AnexpressionthatreturnsareferencetotheDataObjectobject.

Page 447: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 448: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheDOMpropertyallowsyoutoprogrammaticallyaccessandmanipulatethesourceXMLofasecondarydatasourcethatisrepresentedbytheDataObjectobject.AfteryouhavesetareferencetotheXMLDOM,whichcontainsthesourceXMLdataofasecondarydatasource,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

Page 449: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theDOMpropertyoftheDataObjectobjectisusedtoreturnallofthecontentsofaform'ssecondarydatasourceusingthexmlpropertyoftheXMLDOM:

varstrXML;strXML=XDocument.DataObjects("CityList").DOM.xml;

Page 450: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 451: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DOMProperty(Index)

TheDOMpropertyreturnsareferencetotheDocumentObjectModel(DOM).ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaDOMpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheDOMproperty.

DOMpropertyasitappliestotheDataObjectobject.

DOMpropertyasitappliestotheMergeEventobject.

DOMpropertyasitappliestotheSolutionobject.

DOMpropertyasitappliestotheXDocumentobject.

Page 452: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 453: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DOMProperty(MergeEventObject)

Aread-onlypropertythatreturnsareferencetoaform'sunderlyingXMLdocumentasanXMLDocumentObjectModel(DOM)constructionforthecurrentforminvolvedinamergingoperation.

expression.DOM

expressionRequired.AnexpressionthatreturnsareferencetoaMergeEventobject.

Page 454: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 455: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheDOMpropertyallowsyoutoaccessandmanipulatethesourceXMLofaformprogrammatically.AfteryouhavesetareferencetotheXMLDOM,whichcontainsthesourceXMLdataofaform,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

NoteTolearnmoreabouttheXMLDOMandthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

Page 456: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThisexampleshowshowtousetheDOMpropertyofaninstanceoftheMergeEventobjecttomergethedataintothecurrentform:

XDocument.ImportDOM(eventObj.DOM);

Page 457: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 458: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DOMProperty(SolutionObject)

Aread-onlypropertythatreturnsareferencetoanXMLDocumentObjectModel(DOM)thatcontainsthesourceXMLoftheformdefinition(.xsf)file.

expression.DOM

expressionRequired.AnexpressionthatreturnsareferencetoaSolutionobject.

Page 459: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 460: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheDOMpropertyoftheSolutionobjectallowsyoutoprogrammaticallyaccessandmanipulatethesourceXMLofthe.xsffile.AfteryouhavesetareferencetotheXMLDOM,whichcontainsthesourceXMLdataofthe.xsffile,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

Page 461: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theDOMpropertyoftheSolutionobjectisusedtoreturnallofthecontentsofaform's.xsffileusingthexmlpropertyoftheXMLDOM:

varstrXML;

strXML=XDocument.Solution.DOM.xml;

Page 462: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 463: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DOMProperty(XDocumentObject)

Aread-onlypropertythatreturnsareferencetoaform'sunderlyingXMLdocumentintheformofanXMLDocumentObjectModel(DOM).

expression.DOM

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 464: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 465: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAkeypropertyoftheXDocumentobject,theDOMpropertyallowsyoutoprogrammaticallyaccessandmanipulatethesourceXMLofaform.AfteryouhavesetareferencetotheXMLDOM,whichcontainsthesourceXMLdataofaform,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

Page 466: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theDOMpropertyoftheXDocumentobjectisusedtoreturnallofthecontentsofaform'sunderlyingXMLdocumentusingthexmlpropertyoftheXMLDOM:

varstrXML;strXML=XDocument.DOM.xml;

Page 467: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ErrorCodeProperty

SetsorretrievestheerrorcodeofanErrorobject.

expression.ErrorCode

expressionRequired.AnexpressionthatreturnsareferencetotheErrorobject.

Page 468: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 469: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheErrorCodepropertyisimplementedasalonginteger.

Page 470: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theErrorCodepropertyoftheErrorobjectisusedtodisplaytheerrorcodenumberofanerrorinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errorname:"+objError.ErrorCode);

Page 471: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ErrorsProperty

Aread-onlypropertythatreturnsareferencetotheErrorscollectionthatisassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.Errors

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 472: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 473: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheErrorscollectionisassociatedwithaform'sunderlyingXMLdocumentsothatwhenanerroroccurs,itoccurswithintheXMLdocument.AfteryousetareferencetotheErrorscollection,youcanaccessallofitspropertiesandmethodsformanagingtheerrorswithinanInfoPathform.

Page 474: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theErrorspropertyoftheXDocumentobjectisusedtoreturnthecountofthenumberorerrorsandthendisplaythatvalueinamessagebox:

varintErrors;

intErrors=XDocument.Errors.Count;XDocument.UI.Alert("Totalnumberoferrors:"+intErrors);

Page 475: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 476: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ErrorsLocationProperty

Aread/writepropertythatspecifiestheXMLDocumentObjectModel(DOM)nodeunderwhichtheadapterwillcopyreturnederrorsasXML.

expression.ErrorsLocation

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

Page 477: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 478: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheinitialvalueoftheErrorsLocationpropertyisnull.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 479: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 480: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExpirationDateProperty

Aread-onlypropertythatreturnstheexpirationdateofadigitalcertificateinthelocalized'SHORTDATE'format.

expression.ExpirationDate

expressionRequired.AnexpressionthatreturnsaCertificateobject.

Page 481: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 482: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 483: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 484: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExtensionProperty

Aread-onlypropertythatreturnsareferencetotheglobalscriptingobject,whichexposesthefunctionsandglobalvariablescontainedinaMicrosoftOfficeInfoPath2003form'sprimaryscriptingfile.

expression.Extension

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 485: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 486: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheExtensionpropertyfacilitatesusingthefunctionsandglobalvariablesimplementedinanInfoPathform'sscriptingfile.Usually,itisusedfromacustomtaskpane,fromacustomdialogbox,orintheXSLTransformation(XSLT)ofaviewwheredirectaccesstothefunctionsandvariablesmaybeneeded.

Forexample,ifyouweretodeclareaglobalvariableinyourscriptingfilesuchasthefollowing,

varconstCity="Redmond";

YoucouldaccessthatvalueinthecodeofyourcustomtaskpaneordialogboxbyusingtheExtensionproperty,asshownhere:

XDocument.Extension.constCity;

TousetheExtensionpropertywithinacustomtaskpane,youmustfirstsetareferencetotheXDocumentobjectbyusingtheDynamicHTML(DHTML)externalpropertyoftheDHTMLwindowobject,asshowninthisexample:

objXDocument=window.external.XDocument;

Page 487: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theExtensionpropertyoftheXDocumentobjectisusedtoaccessacustomfunction:

objXDocument=window.external.XDocument;objXDocument.Extension.MyCustomFunction();

Page 488: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

FileNameProperty(DAVAdapterObject)

ReturnsorsetsastringthatrepresentsthefilenamethatthecurrentMicrosoftOfficeInfoPath2003formwillbegivenwhentheformissubmittedbytheDAVAdapterobject.

expression.FileName

expressionRequired.AnexpressionthatreturnsareferencetotheDAVAdapterobject

Page 489: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 490: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 491: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThe".xml"filenameextensionwillbeappendedtothestringifitisnotalreadyincluded.IftheFileNamepropertyissettonull,theformisgiventhename"Form.xml"whenitissubmitted.

Page 492: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleshowshowtousetheFileNamepropertyofaninstanceoftheDAVAdapterobjecttosetthefilenameofthesubmittedform:

objDAVAdapter.FileName=strName+"–"+strDate+".xml";

Page 493: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

FileNameProperty(Index)

ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaFileNamepropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheFileNameproperty.

FileNamepropertyasitappliestotheDAVAdapterobject.

FileNamepropertyasitappliestotheSaveEventobject.

Page 494: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

FileNameProperty(SaveEventObject)

Aread-onlypropertythatreturnsastringthatrepresentsthefilenametobeusedintheOnSaveRequestevent.

expression.FileName

expressionRequired.AnexpressionthatreturnsareferencetoaSaveEventobject.

Page 495: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 496: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheIsSaveAspropertyoftheSaveEventobjectistrue,andasaveoperationhasnotyetoccurred,theFileNamepropertyreturnsanemptystring.IftheIsSaveAspropertyistrueandasaveoperationhasalreadyoccurred,thevaluereturnedbytheFileNamepropertyisthefilenameunderwhichtheformwassaved.IftheSaveEventobjectrepresentsasaveoperation(thatis,theIsSaveAspropertyoftheSaveEventobjectisfalse),theFileNamepropertyreturnsthesamevalueastheURIpropertyoftheXDocumentobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 497: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theFileNamepropertyoftheSaveEventobjectisusedinanotificationtotheuserbeforeasaveoperation:

XDocument.UI.Alert("Youareabouttosavethefollowingfile:"+eventObj.

Page 498: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 499: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

FileURLProperty

SetsorretrievestheUniformResourceLocator(URL)oftheXMLfilethatisassociatedwiththeXMLFileAdapterobject.

expression.FileURL

expressionRequired.AnexpressionthatreturnsareferencetotheXMLFileAdapterobject.

Page 500: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 501: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheFileURLpropertysetsandretrievesastringvalue.

Page 502: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theFileURLpropertyoftheXMLFileAdapterobject,accessedthroughtheQueryAdapterpropertyoftheXDocumentobject,isusedtodisplaytheURLoftheXMLfileinamessagebox:

XDocument.UI.Alert("XMLfileURL:"+XDocument.QueryAdapter.

Page 503: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

FolderURLProperty

ApropertythatreturnsorsetsastringthatrepresentstheUniformResourceLocator(URL)towhichtheformwillbesubmittedbytheDAVAdapterobject.

expression.FolderURL

expressionRequired.AnexpressionthatreturnsareferencetotheDAVAdapterobject.

Page 504: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 505: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheSubmitmethodoftheDAVAdapterobjectwillfailifthevalueoftheFolderURLpropertydoesnotbeginwitheitherthe"http:"orthe"https:"prefix.TheSubmitmethodwillalsofailifthesitespecifiedbytheFolderURLpropertyisnotavailable,oriftheURLisnotinthesamesecuritydomainastheformtemplate.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 506: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThisexampleshowshowtousetheFolderURLpropertyofaninstanceoftheDavAdapterobjecttochangethefoldertowhichtheformdatawillbesubmitted:

objDavAdapter.FolderURL=objDavAdapter.FolderURL+"data/";

Page 507: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

HeightProperty

Aread/writepropertyoftypelongintegerthatspecifiestheheightofthethewindowrepresentedbytheWindowobject,measuredinpoints.

expression.Height

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

Page 508: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThispropertywillreturnanerrorifitissetonawindowthatisminimizedormaximized.

Thispropertycan'tbesettoavaluethatislargerthanthevaluereturnedbytheUsableHeightproperty.

Page 509: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 510: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 511: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 512: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

HTMLDocumentProperty

ReturnsareferencetoanHTMLdocumentobjectoftheMicrosoftOfficeInfoPath2003customtaskpane.

expression.HTMLDocument

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLdocumentobject.

Page 513: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 514: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheHTMLDocumentpropertyoftheHTMLTaskPaneobjectisoneofthepropertiesinheritedbytheTaskPaneobjectwhenthetypeofthetaskpaneis0,whichmeansthatitisthecustomtaskpane.

UsingtheHTMLDocumentmethod,youcancallscriptingfunctionscontainedintheHTMLcodeofthetaskpanefromtheprimaryscriptingfileofaform,andyoucanalsodirectlymanipulatetheHTMLcodeofthetaskpaneusinganyofthepropertiesandmethodsthattheHTMLdocumentobjectprovides.

Page 515: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theHTMLDocumentpropertyoftheHTMLTaskPaneobjectisusedtosetareferencetotheHTMLdocumentobjectofthecustomtaskpane.ThenthecodecallstheTaskPaneSwitchViewcustomfunctionthatisdefinedintheHTMLcodeofthecustomtaskpane.

varobjHTMLDoc;

objHTMLDoc=XDocument.View.Window.TaskPanes(0).HTMLDocumentobjHTMLDoc.parentWindow.TaskPaneSwitchView();

Page 516: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 517: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

HTMLWindowProperty

ReturnsareferencetoanHTMLwindowobjectoftheMicrosoftOfficeInfoPath2003customtaskpane.

expression.HTMLWindow

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLwindowobject.

Page 518: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 519: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheHTMLWindowpropertyoftheHTMLTaskPaneobjectisoneofthepropertiesinheritedbytheTaskPaneobjectwhenthetypeofthetaskpaneis0,whichmeansthatitisthecustomtaskpane.

UsingtheHTMLWindowproperty,youcancallscriptingfunctionscontainedintheHTMLcodeofthetaskpanefromtheprimaryscriptingfileofaform,andyoucanalsodirectlymanipulatetheHTMLcodeofthetaskpaneusinganyofthepropertiesandmethodsthattheHTMLdocumentobjectprovides.

NoteTheHTMLWindowpropertyprovidesthesamefunctionalityastheHTMLDocumentproperty,butitisonlyavailablewhenusingfullytrustedforms.Iftheformisnotfullytrusted,youcanusetheHTMLDocumentproperty.

Page 520: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theHTMLWindowpropertyoftheHTMLTaskPaneobjectisusedtosetareferencetotheHTMLwindowobjectofthecustomtaskpaneofafullytrustedform.ThenthecodecallstheTaskPaneSwitchViewcustomfunctionthatisdefinedintheHTMLcodeofthecustomtaskpane.

varobjHTMLDoc;

objHTMLDoc=XDocument.View.Window.TaskPanes(0).HTMLWindowobjHTMLDoc.parentWindow.TaskPaneSwitchView();

Page 521: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IndexProperty

Aread-onlypropertythatreturnsthe0-basedindexoftheformthatiscurrentlybeingmerged.

expression.Index

expressionRequired.AnexpressionthatreturnsareferencetoaMergeEventobject.

Page 522: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 523: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevalueoftheIndexpropertyoftheMergeEventobjectincreasesfrom0toCount-1foreachmergeeventthatoccurswhenformsaremerged.

WhenusedincombinationwiththeCountpropertyoftheMergeEventobject,theIndexpropertycanbeusedtodeterminewhenthelastformhasbeenmerged.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 524: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThisexampleshowshowtousetheIndexpropertyalongwiththeCountpropertyofaninstanceoftheMergeEventobjecttodetermineifthecurrentformisthelastformtobemerged:

varfLast=eventObj.Index+1==eventObj.Count;

Page 525: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 526: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

InputProperty

SetsorretrievesastringvaluethatcontainsthesourceXMLoftheinputelementcontainedintheformdefinition(.xsf)file.

expression.Input

expressionRequired.AnexpressionthatreturnsareferencetotheWebServiceAdapterobject.

Page 527: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 528: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheinputelementofthe.xsffilecontainsinformationaboutthepartsoftheinputSimpleObjectAccessProtocol(SOAP)messagethatareusedtocommunicatewiththeWebservice.SpecificpartsintheSOAPmessagearereplacedbyMicrosoftOfficeInfoPath2003withdatafromwithintheform.ItisusedwhenasecondarydatasourceispopulatedwithdatafromaWebservice,andInfoPathneedstopassargumentstotheWebservicetoretrievethedatathatitprovides.

Page 529: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theInputpropertyoftheWebServiceAdapterobjectisusedtodisplaytheinputstringoftheWebservicedataadapterinamessagebox:

varobjWSAdapter;

objWSAdapter=XDocument.DataObjects("WebCityList").QueryAdapter;XDocument.UI.Alert("Inputstring:"+objWSAdapter.Input);

Page 530: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IntroProperty

Returnsorsetsastringthatrepresentstheintroductioninthebodyofthee-mailmessageforanEmailAdapterobject.

expression.Intro

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

Page 531: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 532: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 533: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThisexampleshowshowtousetheIntropropertyofaninstanceoftheEmailAdapterobjecttochangetheintroductionofthebodyofthee-mailmessagebeforetheEmailAdapterissubmitted:

objEmailAdapter.Intro="Hereismystatusreportfortheweek.";

Page 534: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsCancelledProperty

Aread/writepropertythatprovidesadditionalinformationforuseintheOnSaveRequesteventinconjunctionwiththeReturnStatusproperty.

expression.IsCancelled

expressionRequired.AnexpressionthatreturnsareferencetoaSaveEventobject.

Page 535: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 536: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksWhenclosingInfoPath,theuserispromptedtosavethedocumentiftheIsDirtypropertyoftheXDocumentobjectistrue.IftheIsCancelledpropertyistrue,InfoPathwillbepreventedfromclosingifthesaveoperationfails(thatis,theReturnStatuspropertyisfalse).

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 537: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theIsCancelledpropertyoftheSaveEventobjectisusedtoensurethatthedocumentdoesnotcloseifthesaveoperationwascancelled:

eventObj.IsCancelled=eventObj.PerformSaveOperation();if(eventObj.IsCancelled)return;eventObj.ReturnStatus=true;

Page 538: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsDefaultProperty

SetsorretrievesaBooleanvaluethatindicateswhethertheviewisdefinedasthedefaultviewinaMicrosoftOfficeInfoPath2003form.

expression.IsDefault

expressionRequired.AnexpressionthatreturnsareferencetotheViewInfoobject.

Page 539: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 540: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheIsDefaultpropertyoftheViewInfoobjectcanbeusedtodeterminewhetheraviewisthedefaultview,anditcanbeusedtoprogrammaticallychangethedefaultviewbeforethefirstviewisloaded.

Page 541: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theIsDefaultpropertyisusedtomakethesecondviewcontainedintheViewInfoscollectionthedefaultview:

XDocument.ViewInfos(1).IsDefault=true;

Page 542: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsDirtyProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetherthedatainaMicrosoftOfficeInfoPath2003formhasbeenmodifiedsinceitwaslastsaved.

expression.IsDirty

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 543: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 544: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheIsDirtypropertyisTrue,dataintheform'sunderlyingXMLdocumenthasbeenchangedsinceitwaslastsaved.IfFalse,nochangeshaveoccurred.

NoteChangesthatoccurduringtheOnLoadeventwillnotresultintheIsDirtypropertybeingsettoTrue.

Page 545: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theIsDirtypropertyoftheXDocumentobjectisusedtodeterminewhetherdataintheformhasbeenchanged:

if(XDocument.IsDirty)XDocument.UI.Alert("Datahasbeenchanged.");elseXDocument.UI.Alert("Datahasnotbeenchanged.");

Page 546: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 547: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsDOMReadOnlyProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetherthedataintheunderlyingXMLdocumentofaMicrosoftOfficeInfoPath2003formhasbeenplacedinaread-onlystate.

expression.IsDOMReadOnly

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 548: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 549: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheIsDOMReadOnlypropertyisTrue,dataintheform'sunderlyingXMLdocumentisinaread-onlystateandcannotbechanged.IfFalse,thedataintheform'sunderlyingXMLdocumentcanbechanged.

Todeterminewhethertheformhasbeenplacedinaread-onlystate,usetheIsReadOnlypropertyoftheXDocumentobject.

Thedatainaform'sXMLdocumentwillbeplacedinaread-onlystateinthefollowingscenarios:

Theformisdigitallysigned

TheformisinReducedFunctionalityMode(RFM)mode

DuringtheOnBeforeChangeevent

DuringtheOnValidateevent

Duringanundoorredooperation

Page 550: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theIsDOMReadOnlypropertyoftheXDocumentobjectisusedtodeterminewhetherdataintheform'sunderlyingXMLdocumenthasbeenplacedinaread-onlystate.Ifithas,areturnstatementisusedtoexittheeventhandler.

functionmsoxd__item::OnAfterChange(objEvent){

//DeterminewhethertheXMLDOMisread-only.if(XDocument.IsDOMReadOnly)return;

//Continuenormalprocessing...

}

Page 551: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsNewProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetheranewlycreatedMicrosoftOfficeInfoPath2003formhasbeensaved.

expression.IsNew

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 552: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 553: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheIsNewpropertyisTrue,dataintheform'sunderlyingXMLdocumenthasnotbeensavedsincetheformwasinitiallycreated.IfFalse,thedatainthenewform'sunderlyingXMLdocumenthasbeensaved.

Page 554: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theIsNewpropertyoftheXDocumentobjectisusedtodeterminewhetherthedatainanewformhasbeensaved:

if(XDocument.IsNew)XDocument.UI.Alert("Pleasesaveyourform.");elsereturn;

Page 555: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsReadOnlyProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetheraMicrosoftOfficeInfoPath2003formisinread-onlymode.

expression.IsReadOnly

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 556: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 557: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheIsReadOnlypropertyisTrue,theformhasbeenplacedinaread-onlystate.Changescanstillbemadetotheform,butitcannotbesavedusingasaveoperation,itmustbesavedusingasave-asoperation.

Todeterminewhethertheform'sunderlyingXMLdocumenthasbeenplacedinaread-onlystate,usetheIsDOMReadOnlypropertyoftheXDocumentobject.

Page 558: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theIsReadOnlypropertyoftheXDocumentobjectisusedtodeterminewhethertheformisinaread-onlystate:

if(XDocument.IsReadOnly)XDocument.UI.Alert("Theformcannotbemodified.");elsereturn;

Page 559: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsRecoveredProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetheraMicrosoftOfficeInfoPath2003formwaslastsavedbyanAutoRecoversaveoperation.

expression.IsRecovered

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 560: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 561: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 562: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleshowshowtousetheIsRecoveredpropertytoindicate,whentheformisopened,whethertheformwaslastsavedbyanAutoRecoversaveoperation:

functionXDocument::OnLoad(eventObj){XDocument.UI.Alert("LastsavedbyanAutoRecoversaveoperation:"+XDocument.}

Page 563: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsSaveAsProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetherthePerformSaveOperationmethodoftheSaveEventobjectwillbeperformedasa"save"operationorasa"saveas"operation.

expression.IsSaveAs

expressionRequired.AnexpressionthatreturnsareferencetoaSaveEventobject.

Page 564: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 565: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheIsSaveAspropertyreturnstruewhentheeventwastriggeredbyacalltotheSaveAsmethod,orbyacalltotheSavemethodwhenthedocumentisnew,orbyacalltoeithermethodwhenthedocumentisread-only.Otherwise,theIsSaveAspropertyreturnsFalse.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 566: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theIsSaveAspropertyoftheSaveEventobjectisusedtodetermineiftheuserwillbepresentedwithaSaveAsdialogbox;otherwise,itwillinformtheuserthattheformwillsimplybesaved.

if(!eventObj.IsSaveAs){XDocument.UI.Alert(“Abouttosavethisform.”);}eventObj.PerformSaveOperation();

Page 567: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 568: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsSignedProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetheraMicrosoftOfficeInfoPath2003formhasbeendigitallysignedusingdigitalsignatures.

expression.IsSigned

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 569: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 570: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheIsSignedpropertyisTrue,theformhasbeendigitallysigned.IfFalse,theformhasnotbeendigitallysigned.

InfoPathusesXMLSignaturestodigitallysignforms.

NoteIfaformhasbeendigitallysigned,itsunderlyingXMLdocumentisplacedinaread-onlystate.

Page 571: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theIsSignedpropertyoftheXDocumentobjectisusedtodeterminewhetheraformhasbeendigitallysigned:

if(XDocument.IsSigned)XDocument.UI.Alert("Thisformcontainsdigitalsignatures.");elsereturn;

Page 572: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 573: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IssuedByProperty

Aread-onlypropertythatreturnstheissuerofthedigitalcertificate.

expression.IssuedBy

expressionRequired.AnexpressionthatreturnsaCertificateobject.

Page 574: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 575: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 576: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 577: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IssuedToProperty

Aread-onlypropertythatreturnsastringrepresentingtowhomthedigitalcertificateisissued.

expression.IssuedTo

expressionRequired.AnexpressionthatreturnsaCertificateobject.

Page 578: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 579: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 580: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 581: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsUndoRedoProperty(DataDOMEventObject)

Aread-onlypropertythatreturnsaBooleanvalueindicatingwhetherthedatavalidationeventoccursduringanundooperationoraredooperation.

expression.IsUndoRedo

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

Page 582: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 583: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksWhenanundooraredooperationtakesplace,theform'sunderlyingXMLdocumentisplacedinaread-onlystateandcannotbemodified.ThiscansometimesoccurduringanOnAfterChangeevent;whenitdoes,theIsUndoRedopropertyisusedtobypassthescript-baseddatavalidationthatitcontains.

Page 584: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheDataValidationdevelopersampleform,theIsUndoRedopropertyisusedtodeterminewhethertheeventisoccurringduringanundoorredooperation.Ifitis,theeventhandlerisexitedusingthereturn;statement.

functionmsoxd__itemB_quantityListB::OnAfterChange(eventObj){if(eventObj.IsUndoRedo){//AnundoorredooperationhasoccurredandtheDOMisread-only.return;}XDocument.DOM.selectSingleNode("/sampleData/listB/total").text=GetTotal("/sampleData/listB/itemB/quantityListB");}

Page 585: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsUndoRedoProperty(DocContextChangeEventObject)

Aread-onlypropertythatreturnsaBooleanvalueindicatingwhetherthecontextchangeeventoccurredinresponsetoundoingoperationorredoinganoperation.

expression.IsUndoRedo

expressionRequired.ReturnsareferencetoaDocContextChangeEventobject.

Page 586: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 587: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 588: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsUndoRedoProperty(Index)

ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickanIsUndoRedopropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheIsUndoRedoproperty.

IsUndoRedopropertyasitappliestotheDataDOMEventobject.

IsUndoRedopropertyasitappliestotheDocContextChangeEventobject.

Page 589: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 590: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ItemProperty(DataAdaptersCollection)

Aread-onlypropertythatreturnsareferencetothespecifieddataadapterobjectfromtheDataAdaptersCollectioncollection,basedonpositionorname.

expression.Item(ByValvarIndexAsVariant)AsObject

expressionRequired.AnexpressionthatreturnsareferencetotheDataAdapterscollection.

varIndexRequiredVariant.AnexpressionthatspecifiesthepositionofamemberoftheDataAdapterscollection.Iftheargumentisanumericexpression,itmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.Iftheargumentisastringexpression,itmustbethenameofamemberofthecollection.

returnsAreferencetoadataadapterobject.

Page 591: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 592: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 593: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theItempropertyoftheDataAdapterscollectionisusedtoreturnareferencetoadataadapterinthecollection:

varobjDataAdapter;objDataAdapter=XDocument.DataAdapters.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheDataAdapterscollection,itcanalsobeusedasfollows:

varobjDataAdapter;objDataAdapter=XDocument.DataAdapters(0);

YoucanalsousethenameofadataadapterastheargumenttotheItemmethod,asshowninthefollowingexample:

varobjDataAdapter;objDataAdapter=XDocument.DataAdapters("MyDataAdapter");

Page 594: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 595: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ItemProperty(DataObjectsCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedDataObjectobjectfromtheDataObjectscollection.

expression.Item(ByValvarIndexAsVariant)AsDataObject

expressionRequired.AnexpressionthatreturnsareferencetotheDataObjectscollection.

varIndexRequiredVariant.AnexpressionthatspecifiesthepositionofamemberoftheDataObjectscollection.Ifanumericexpression,theargumentmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.Ifastringexpression,theargumentmustbethenameofamemberofthecollection.

returnsAreferencetoaDataObjectobject.

Page 596: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 597: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfthevalueprovidedforthevarIndexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheDataObjectobjectthattheItempropertyreturns,youcanaccessanyofitspropertiesormethods.

Page 598: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theItempropertyoftheDataObjectscollectionisusedtoreturnareferencetoaDataObjectobject:

varobjDataObject;objDataObject=XDocument.DataObjects.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheDataObjectscollection,itcanalsobeusedasfollows:

varobjDataObject;objDataObject=XDocument.DataObjects(0);

YoucanalsousethenameoftheDataObjectobjectastheargumenttotheItemmethod,asshowninthefollowingexample:

varobjDataObject;objDataObject=XDocument.DataObjects("MyDataObject");

Page 599: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ItemProperty(ErrorsCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedErrorobjectfromtheErrorscollection.

expression.Item(ByValindexAsLong)AsError

expressionRequired.AnexpressionthatreturnsareferencetotheErrorscollection.

indexRequiredLongInteger.AnexpressionthatspecifiesthepositionofamemberoftheErrorscollection.Theargumentmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.

returnsAreferencetoanErrorobject.

Page 600: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 601: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfthevalueprovidedfortheindexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheErrorobjectthattheItempropertyreturns,youcanaccessanyofitspropertiesormethods.

Page 602: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theItempropertyoftheErrorscollectionisusedtoreturnareferencetoanErrorobject:

varobjError;objError=XDocument.Errors.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheErrorscollection,itcanalsobeusedasfollows:

varobjError;objError=XDocument.Errors(0);

Page 603: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ItemProperty(Index)

TheItempropertyreturnsareferencetoanobjectcontainedinacollection.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickanItempropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheItemproperty.

ItempropertyasitappliestotheDataAdapterscollection.

ItempropertyasitappliestotheDataObjectscollection.

ItempropertyasitappliestotheErrorscollection.

ItempropertyasitappliestotheSignaturescollection.

ItempropertyasitappliestotheSignedDataBlockscollection.

ItempropertyasitappliestotheTaskPanescollection.

ItempropertyasitappliestotheViewInfoscollection.

ItempropertyasitappliestotheWindowscollection.

ItempropertyasitappliestotheXDocumentscollection.

ItempropertyasitappliestotheXMLNodescollection.

Page 604: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 605: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ItemProperty(SignaturesCollection)

Aread-onlypropertythatreturnsareferencetothespecifieddigitalsignaturefromtheSignaturescollection.

expression.Item(ByValvarIndexAsVariant)AsSignature

expressionRequired.AnexpressionthatreturnsareferencetotheSignaturescollection.

varIndexRequiredVariant.AnumericexpressionthatspecifiesthepositionofamemberoftheSignaturescollection.Theargumentmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.

returnsAreferencetoadigitalsignature.

Page 606: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 607: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 608: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ItemProperty(SignedDataBlocksCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedSignedDataBlockobjectfromtheSignedDataBlockscollection,basedonpositionorname.

expression.Item(ByValvarIndexAsVariant)AsSignedDataBlock

expressionRequired.AnexpressionthatreturnsaSignedDataBlockscollection.

varIndexRequiredVariant.AnexpressionthatspecifiesthepositionofamemberoftheSignedDataBlockscollection.Ifthisargumentisanumericexpression,itmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.Ifthisargumentisastringexpression,itmustbethenameofamemberofthecollection.

returnsAreferencetoaSignedDataBlockobject.

Page 609: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 610: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 611: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 612: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ItemProperty(TaskPanesCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedTaskPaneobjectfromtheTaskPanescollection.

expression.Item(ByValvarIndexAsVariant)AsTaskPane

expressionRequired.ReturnsareferencetotheTaskPanescollection.

varIndexRequiredVariant.Anumericexpressionthatspecifiesthetypeoftaskpane.BasedontheXdTaskPaneTypeenumeration.

returnsAreferencetoaTaskPaneobject.

Page 613: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 614: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfthevalueprovidedforthevarIndexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheTaskPaneobjectthattheItempropertyreturns,youcanaccessanyofitspropertiesandmethods.

Page 615: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theItempropertyoftheTaskPanescollectionisusedtoreturnareferencetoaspecifiedTaskPaneobject:

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes.Item(4);

BecausetheItempropertyisthedefaultpropertyoftheTaskPanescollection,itcanalsobeusedasfollows:

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes(4);

Page 616: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 617: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ItemProperty(ViewInfosCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedViewInfoobjectfromtheViewInfoscollection.

expression.Item(ByValvarIndexAsVariant)AsViewInfo

expressionRequired.AnexpressionthatreturnsareferencetotheViewInfoscollection.

varIndexRequiredVariant.AnexpressionthatspecifiesthepositionofamemberoftheViewInfoscollection.Ifanumericexpression,theargumentmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.Ifastringexpression,theargumentmustbethenameofamemberofthecollection.

returnsAreferencetoaViewInfoobject.

Page 618: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 619: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfthevalueprovidedforthevarIndexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheViewInfoobjectthattheItempropertyreturns,youcanaccessanyofitsproperties.

Page 620: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theItempropertyoftheViewInfoscollectionisusedtoreturnareferencetoaViewInfoobject:

varobjViewInfo;objViewInfo=XDocument.ViewInfos.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheViewInfoscollection,itcanalsobeusedasfollows:

varobjViewInfo;objViewInfo=XDocument.ViewInfos(0);

YoucanalsousethenameoftheViewInfoobject,whichisthenameofaview,astheargumenttotheItemmethod,asshowninthefollowingexample:

varobjViewInfo;objViewInfo=XDocument.ViewInfos("MyView");

Page 621: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ItemProperty(WindowsCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedWindowobjectfromtheWindowscollection.

expression.Item(ByValvarIndexAsVariant)AsWindow

expressionRequired.AnexpressionthatreturnsareferencetotheWindowscollection.

varIndexRequiredVariant.AnexpressionthatspecifiesthepositionofamemberoftheWindowscollection.Theargumentmustbeanumberfrom0tothevalueofthecollection'scountpropertyminus1.

returnsAreferencetoaWindowobject.

Page 622: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 623: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfthevalueprovidedforthevarIndexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheWindowobjectthattheItempropertyreturns,youcanaccessanyofitspropertiesandmethods.

Page 624: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theItempropertyoftheWindowscollectionisusedtoreturnareferencetoaWindowobject:

varobjWindow;objWindow=Application.Windows.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheWindowscollection,itcanalsobeusedasfollows:

varobjWindow;objWindow=Application.Windows(0);

Page 625: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 626: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ItemProperty(XDocumentsCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedXDocumentobjectfromtheXDocumentscollection.

expression.Item(ByValvarIndexAsVariant)AsXDocument

expressionRequired.AnexpressionthatreturnsareferencetotheXDocumentscollection.

varIndexRequiredVariant.AnexpressionthatspecifiesthepositionofamemberoftheXDocumentscollection.Ifanumericexpression,theargumentmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.Ifastringexpression,theargumentmustbetheUniformResourceLocator(URL)pathofamemberofthecollection.

returnsAreferencetoanXDocumentobject.

Page 627: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 628: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfthevalueprovidedforthevarIndexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheXDocumentobjectthattheItempropertyreturns,youcanaccessanyofitspropertiesormethods.

Page 629: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theItempropertyoftheXDocumentscollectionisusedtoreturnareferencetoanXDocumentobject:

varobjXDoc;objXDoc=Application.XDocuments.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheXDocumentscollection,itcanalsobeusedasfollows:

varobjXDoc;objXDoc=Application.XDocuments(0);

YoucanalsousethenameoftheXDocumentastheargumenttotheItemmethod,asshowninthefollowingexample:

varobjXDoc;objXDoc=Application.XDocuments("MyForm");

Page 630: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 631: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ItemProperty(XMLNodesCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedXMLDocumentObjectModel(DOM)nodefromtheXMLNodescollection.

expression.Item(ByValvarIndexAsVariant)AsIXMLDOMNode

expressionRequired.ReturnsareferencetotheXMLNodescollection.

varIndexRequiredVariant.AnumericexpressionthatspecifiesthepositionofamemberoftheXMLNodescollection.Theargumentmustbeanumberfrom0tothevalueofthecollection'scountpropertyminus1.

returnsAreferencetoanXMLDOMnodeobject.

Page 632: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 633: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfthevalueprovidedforthevarIndexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheXMLDOMnodeobjectthattheItempropertyreturns,youcanaccessanyofitspropertiesandmethods.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

Page 634: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theItempropertyoftheXMLNodescollectionisusedtoreturnareferencetoanXMLDOMnodeobject:

varobjXMLNodes;varobjXMLNode;

objXMLNodes=XDocument.View.GetContextNodes();objXMLNode=objXMLNodes.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheXMLNodescollection,itcanalsobeusedasfollows:

varobjXMLNodes;varobjXMLNode;

objXMLNodes=XDocument.View.GetContextNodes();objXMLNode=objXMLNodes(0);

Page 635: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

LanguageProperty

SetsorretrievesaMicrosoftOfficeInfoPath2003form'sdefaultlanguagecode.

expression.Language

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 636: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 637: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThelanguagesettingsforanInfoPathformcanalsobeaccessedusingtheLanguageSettingspropertyoftheApplicationobject.

Page 638: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theLanguagepropertyoftheXDocumentobjectisusedtodisplayaform'scurrentlanguagesettinginamessagebox:

XDocument.UI.Alert("Thecurrentlanguageis:"+XDocument.Language

Page 639: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 640: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

LanguageSettingsProperty

Aread-onlypropertythatreturnsareferencetotheMicrosoftOfficeLanguageSettingsobject.

expression.LanguageSettings

expressionAnexpressionthatreturnsareferencetotheApplicationobject.

Page 641: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 642: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheLanguageSettingspropertyisavailableonlywhenusingscriptingcode.

AfteryouestablishareferencetotheLanguageSettingsobject,youcanaccessallthepropertiesandmethodsoftheobject.

Page 643: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleusestheLanguageIDpropertyoftheLanguageSettingsobjecttoreturntheLCIDvalue(afour-digitnumber)forthelanguagethatiscurrentlybeingusedfortheOfficehelpsystem:

Application.LanguageSettings.LanguageID(3);

NoteBecauseMicrosoftOfficeInfoPath2003usesscriptingcodeinsteadofVisualBasicforApplications(VBA),youcannotusethenamesofenumeratedvalues;youmustusethenumericalvaluesoftheenumerations,asinthepreviousexample(msoLanguageIDHelp=3).

Page 644: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

LeftProperty

Aread/writepropertyoftypelongintegerthatspecifiesthehorizontalpositionofthewindowrepresentedbytheWindowobject,measuredinpoints.

expression.Left

expressionRequired.AnexpressionthatreturnsareferencetoaWindowobject.

Page 645: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThispropertywillreturnanerrorifitissetonawindowthatisminimizedormaximized.

Settingthispropertytoapositionthatisoffthescreen,willactuallycausethewindowtobedisplayedonthescreen.

Page 646: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 647: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 648: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

MachineOnlineStateProperty

Aread-onlypropertyoftypeXdMachineOnlineStatethatreturnsthecurrentconnectionstateoftheclientcomputer.

expression.MachineOnlineState

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

Page 649: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 650: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 651: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 652: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

MailEnvelopeProperty

Aread-onlypropertythatreturnsareferencetotheMailEnvelopeobjectassociatedwiththewindowthatisrepresentedbytheWindowobject.

expression.MailEnvelope

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

Page 653: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 654: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheMailEnvelopepropertycanbeusedonlywiththeeditingwindowtypes;ifusedwithadesigningwindowtype,itwillreturnanerror.Itwillalsoreturnanerrorifnoformisopenintheformarea.

Page 655: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theMailEnvelopepropertyoftheWindowobjectisusedtosetareferencetotheMailEnvelopeobject,whichisthenusedtocreateanddisplayacustome-mailmessage:

varobjEmail;

objEmail=Application.ActiveWindow.MailEnvelope;objEmail.Subject="Teste-mailmessage";objEmail.Visible=true;

Page 656: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 657: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

MatchExpressionProperty

Aread-onlypropertythatreturnsastringvaluecontainingtheXPathexpressionfortheXMLDocumentObjectModel(DOM)nodeforwhichtheeventiscurrentlybeingprocessed.

expression.MatchExpression

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

Page 658: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 659: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheXPathexpressionthattheMatchExpressionpropertycontainspointstoanXMLDOMnodeintheform'sunderlyingXMLdocument.Thisisthenodethatiscurrentlybeingvalidatedbythedatavalidationeventhandler.

Page 660: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theMatchExpressionpropertyoftheDataDOMEventobjectisusedtodisplaytheXPathexpressionoftheXMLDOMnodethatiscurrentlybeingvalidated:

XDocument.UI.Alert("Matchexpression:"+eventObj.MatchExpression

Page 661: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

MathProperty

Aread-onlypropertythatreturnsareferencetotheMathobject.

expression.Math

expressionRequired.AnexpressionthatreturnsareferencetotheUtilobject.

Page 662: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 663: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsingtheMathproperty,youcanaccessallofthemethodsthattheMathobjectprovides.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 664: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NameProperty(ADOAdapterObject)

Aread-onlypropertythatreturnsthenameofanADOAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoanADOAdapterobject.

Page 665: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 666: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 667: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NameProperty(ApplicationObject)

Aread-onlypropertythatreturnsastringcontainingthenameoftheMicrosoftOfficeInfoPath2003application.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

Page 668: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 669: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameoftheapplicationdoesnotcontaintheversionnumber.Toobtaintheversionnumberofanapplication,usetheVersionpropertyoftheApplicationobject.

Page 670: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theAlertmethodoftheUIobject,accessedthroughtheXDocumentobject,isusedtodisplayamessageboxthatindicatesthenameoftheapplication:

XDocument.UI.Alert("Applicationname:"+Application.Name);

Page 671: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 672: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NameProperty(DataObjectObject)

Aread-onlypropertythatreturnsastringvalueindicatingthenameoftheassociatedDataObjectobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetotheDataObjectobject.

Page 673: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 674: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameoftheDataObjectobjectisthesameasthenameofthesecondarydatasourcethatitrepresents.ThenameoftheDataObjectobjectcanalsobeusedastheargumenttotheItempropertyoftheDataObjectscollection.

Page 675: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theNamepropertyoftheDataObjectobjectisusedtotodisplaythenameoftheDataObjectobjectinamessagebox:

varobjDataObject;

objDataObject=XDocument.DataObjects(0);XDocument.UI.Alert("DataObjectname:"+objDataObject.Name);

Page 676: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NameProperty(DAVAdapterObject)

Aread-onlypropertythatreturnsthenameofaDAVAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoaDAVAdapterobject.

Page 677: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 678: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 679: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NameProperty(EmailAdapterObject)

Aread-onlypropertythatreturnsthenameofanEmailAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

Page 680: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 681: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 682: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NameProperty(HWSAdapterObject)

Aread-onlypropertythatreturnsthenameofanHWSAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoaHWSAdapterobject.

Page 683: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 684: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 685: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NameProperty(Index)

TheNamepropertyreturnsastringthatspecifiesthenameofanobject.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaNamepropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheNameproperty.

NamepropertyasitappliestotheADOAdapterobject.

NamepropertyasitappliestotheApplicationobject.

NamepropertyasitappliestotheDataObjectobject.

NamepropertyasitappliestotheDAVAdapterobject.

NamepropertyasitappliestotheEmailAdapterobject.

NamepropertyasitappliestotheHWSAdapterobject.

NamepropertyasitappliestotheSharepointListAdapterobject.

NamepropertyasitappliestotheSignedDataBlockobject.

NamepropertyasitappliestotheViewobject.

NamepropertyasitappliestotheViewInfoobject.

NamepropertyasitappliestotheWebServiceAdapterobject.

NamepropertyasitappliestotheXMLFileAdapterobject.

Page 686: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NameProperty(SharePointListAdapterObject)

Aread-onlypropertythatreturnsthenameofaSharepointListAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoaSharePointListAdapterobject

Page 687: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 688: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 689: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NameProperty(SignedDataBlockObject)

Aread-onlypropertythatreturnsthenameofaSignedDataBlockobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoaSignedDataBlockobject.

Page 690: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 691: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 692: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NameProperty(ViewObject)

Aread-onlypropertythatreturnsastringcontainingthenameoftheviewthatisrepresentedbytheViewobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

Page 693: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 694: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTodeterminewhetheraviewisthedefaultview,usetheViewInfoobject.

Page 695: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheEventsdevelopersampleform,theNamepropertyoftheViewobjectisusedtodeterminewhichviewtheuserhasswitchedto.IftheviewistheArchiveCustomerview,anotevalueisaddedtotheform'sunderlyingXMLdocument:

functionXDocument::OnSwitchView(eventObj){varoDate=newDate();

if(XDocument.View.Name=="ArchiveCustomer"){varoNotesNode=XDocument.DOM.selectSingleNode("/Customers/CustomerInfo/Notes");varoDivNode=XDocument.DOM.createNode(1,"div","http://www.w3.org/1999/xhtml");

oDivNode.text="Noterecorded"+oDate.toString();oNotesNode.appendChild(oDivNode);}}

Page 696: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NameProperty(ViewInfoObject)

Aread-onlypropertythatreturnsastringvalueindicatingthenameoftheviewthatisassociatedwiththeViewInfoobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetotheViewInfoobject.

Page 697: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 698: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameoftheViewInfoobjectisthesameasthenameoftheviewthatitrepresents.ThenameoftheViewInfoobjectcanalsobeusedastheargumenttotheItempropertyoftheViewInfoscollection.

Page 699: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theNamepropertyoftheViewInfoobjectisusedtotodisplaythenameofaviewinamessagebox:

varobjViewInfo;

objViewInfo=XDocument.ViewInfos(0);XDocument.UI.Alert("Viewname:"+objViewInfo.Name);

Page 700: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NameProperty(WebServiceAdapterObject)

Aread-onlypropertythatreturnsthenameofaWebServiceAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

Page 701: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 702: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 703: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NameProperty(XMLFileAdapterObject)

Aread-onlypropertythatreturnsthenameofanXMLFileAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoanXMLFileAdapterobject.

Page 704: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 705: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 706: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 707: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NewValueProperty

Aread-onlypropertythatreturnsastringvalueindicatingthevalueofanXMLDocumentObjectModel(DOM)nodethatisbeingupdatedorinsertedduringadatavalidationevent.

expression.NewValue

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

Page 708: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 709: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheNewValuepropertycontainsthevalueoftheXMLDOMnodethatwillreplacetheexistingvalue.TogettheoriginalvalueoftheXMLDOMnode,usetheOldValuepropertyoftheDataDOMEventobject.

Page 710: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheADO(ActiveXDataObjects)developersampleform,theNewValuepropertyoftheDataDOMEventobjectisusedtodeterminewhetherthenewvalueoftheXMLDOMnodeisanemptystring.Ifitisnot,thecodesetsotherfieldstobeemptystrings.

functionmsoxd__Employees_EmployeeID_attr::OnAfterChange(eventObj){if(eventObj.IsUndoRedo){//AnundoorredooperationhasoccurredandtheDOMisread-only.return;}if(eventObj.NewValue=="")return;

if(XDocument.DOM.selectSingleNode('/dfs:myFields/dfs:queryFields/q:Employees/@FirstName').text!="")XDocument.DOM.selectSingleNode('/dfs:myFields/dfs:queryFields/q:Employees/@FirstName').text="";

if(XDocument.DOM.selectSingleNode('/dfs:myFields/dfs:queryFields/q:Employees/@LastName').text!="")XDocument.DOM.selectSingleNode('/dfs:myFields/dfs:queryFields/q:Employees/@LastName').text="";}

Page 711: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 712: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NodeProperty(ErrorObject)

Aread-onlypropertythatreturnsareferencetotheXMLDocumentObjectModel(DOM)nodeofaform'sunderlyingXMLdocumentthatisassociatedwithanErrorobject.

expression.Node

expressionRequired.AnexpressionthatreturnsareferencetotheErrorobject.

Page 713: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 714: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsingtheNodeproperty,youcanaccessallofthepropertiesandmethodsthattheXMLDOMnodeobjectprovides.

Page 715: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theNodepropertyoftheErrorobjectisusedtodisplaytheXMLnodeofanerrorinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errorname:"+objError.Node.xml);

Page 716: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 717: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NodeProperty(Index)

TheNodepropertyreturnsareferencetotheXMLDocumentObjectModel(DOM)nodeofaform'sunderlyingXMLdocumentthatisassociatedwithaparticularobject.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaNodepropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheNodeproperty.

NodepropertyasitappliestotheErrorobject.

NodepropertyasitappliestotheInfoPathControlSiteobject.

Page 718: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NodeProperty(InfoPathControlSiteObject)

RetrievesareferencetotheXMLnodetowhichtheActiveXcontrolisbound.

expression.Node

expressionRequired.AnexpressionthatreturnsareferencetotheInfoPathControlSiteobject.

Page 719: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 720: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 721: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 722: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OldValueProperty

Aread-onlypropertythatreturnsastringvalueindicatingtheoriginalvalueofanXMLDocumentObjectModel(DOM)nodethatisbeingupdatedordeletedduringadatavalidationevent.

expression.OldValue

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

Page 723: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 724: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheOldValuepropertycontainstheoriginalvalueoftheXMLDOMnodethatwillbereplacedwithanewvalueordeleted.TogetthenewvalueoftheXMLDOMnode,usetheNewValuepropertyoftheDataDOMEventobject.

Page 725: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theOldValuepropertyoftheDataDOMEventobjectisusedtodisplaytheoriginalvalueofanXMLDOMnode,alongwithitsnewvalue:

XDocument.UI.Alert("Originalvalue:"+eventObj.OldValue+"\nNewvalue:"+eventObj.NewValue);

Page 726: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 727: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OperationProperty(DataDOMEventObject)

Aread-onlypropertythatreturnsastringvalueindicatingthetypeofactionthatisappliedtoanXMLDocumentObjectModel(DOM)nodeduringadatavalidationevent.

expression.Operation

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

Page 728: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 729: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevaluesthattheOperationpropertyreturnsincludeInsert,Update,andDelete.

Page 730: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheStructuralEditingdevelopersampleform,theOperationpropertyoftheDataDOMEventobjectisusedtocheckthetypeofactionthatisoccurring;ifitisadeleteaction,thecodecallsacustomfunction:

functionmsoxd__item::OnAfterChange(eventObj){if(!eventObj.IsUndoRedo&&eventObj.Operation=="Delete"&&eventObj.Site.nodeName=="item"&&eventObj.Source.nodeName=="item"){Calculate();}}

Page 731: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OperationProperty(Index)

TheOperationpropertyeitherspecifiesorreturnsastringthatrepresentsaWebservicecommandstring,orreturnsthenameofaneventaction.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickanOperationpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheOperationproperty.

OperationpropertyasitappliestotheDataDOMEventobject.

OperationpropertyasitappliestotheWebServiceAdapterobject.

Page 732: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 733: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OperationProperty(WebServiceAdapterObject)

SetsorretrievesastringvaluethatcontainsthesourceXMLoftheoperationelementcontainedintheformdefinition(.xsf)file.

expression.Operation

expressionRequired.AnexpressionthatreturnsareferencetotheWebServiceAdapterobject.

Page 734: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 735: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheoperationelementofthe.xsffilecontainsinformationabouttheWebservice,includingitsname,themethodusedforretrievingandsubmittingdata,anditsUniformResourceLocator(URL).

Page 736: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theOperationpropertyoftheWebServiceAdapterobjectisusedtodisplaytheoperationstringoftheWebservicedataadapterinamessagebox:

varobjWSAdapter;

objWSAdapter=XDocument.DataObjects("WebCityList").QueryAdapter;XDocument.UI.Alert("Operationstring:"+objWSAdapter.Operation

Page 737: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 738: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OutputLocationProperty

Aread/writepropertythatspecifiestheXMLDocumentObjectModel(DOM)nodeunderwhichtheadapterwillcopytheXMLreturnedbytheXMLWebservice.

expression.OutputLocation

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

Page 739: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 740: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfthevalueoftheOutputLocationpropertyisnotsetonaqueryadapter,itwillcorrespondtothedataFieldselementinthedatasourceassociatedwiththedataconnection.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 741: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 742: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

PackageURLProperty

Aread-onlypropertythatreturnsastringcontainingtheUniformResourceLocator(URL)ofthecachefolderthatcontainsaMicrosoftOfficeInfoPath2003form'sextractedformfiles.

expression.PackageURL

expressionRequired.AnexpressionthatreturnsareferencetoaSolutionobject.

Page 743: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 744: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThePackageURLpropertyissetatruntime,andtheURLitcontainspointstothefolderwheretheformtemplate'sfilesarecached.

Page 745: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,thePackageURLpropertyoftheSolutionobjectisusedtodisplaythefolder'sURLinamessagebox:

XDocument.UI.Alert("PackageURL:"+XDocument.Solution.PackageURL

Page 746: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 747: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentProperty

Aread-onlypropertythatreturnsareferencetotheXMLDocumentObjectModel(DOM)nodeoftheparentoftheXMLDOMnodebeingchangedduringadatavalidationevent.

expression.Parent

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

Page 748: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 749: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfteryouhavesetareferencetotheXMLDOMnodethattheParentpropertyreturns,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.Thiscanbeespeciallyusefulduringdeleteoperations,becausetheParentpropertymapstothelocationoftheXMLDOMnodethatwasremoved.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

Page 750: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingpartialexamplefromtheDataValidationdevelopersampleform,theParentpropertyoftheDataDOMEventobjectisusedtocheckthenameoftheparentnode;ifitmatchescertaincriteria,anerrormessageisdisplayed:

functionmsoxd__shippingDates::OnBeforeChange(eventObj){varobjOrderDate=newDate(XDocument.DOM.selectSingleNode('/sampleData/shippingDates/orderDate').text.replace(/(.*)-(.*)-(.*)/,"$2-$3-$1"));varobjShipDate=newDate(XDocument.DOM.selectSingleNode('/sampleData/shippingDates/shipDate').text.replace(/(.*)-(.*)-(.*)/,"$2-$3-$1"));...

if(objShipDate.toString()!="NaN"&&objOrderDate.toString()=="NaN"){eventObj.ReturnMessage="TheShipDateisinvalidwithoutanorderdate.";

if(eventObj.Parent.nodeName=="orderDate")eventObj.ReturnMessage+="YoumustdeletetheShipDate"+"beforedeletingtheOrderDate.";

eventObj.ReturnStatus=false;return;}...}

Page 751: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 752: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryAdapterProperty(DataObjectObject)

Aread-onlypropertythatreturnsareferencetothedataadapterobjectthatisusedforasecondarydatasource.

expression.QueryAdapter

expressionRequired.AnexpressionthatreturnsareferencetotheDataObjectobject.

Page 753: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 754: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfteryouhavesetareferencetothedataadapterobjectthattheQueryAdapterpropertyreturns,youcanusethepropertiesandmethodsthattheparticulardataadapterobjectcontains.

MicrosoftOfficeInfoPath2003supportsthreetypesofdataadapters:

1. ActiveXDataObjectsRepresentedbytheADOAdapterobject.

2. WebservicesRepresentedbytheWebServiceAdapterobject.

3. XMLfileRepresentedbytheXMLFileAdapterobject.

Page 755: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theQueryAdapterpropertyoftheDataObjectobjectisusedtoreturnareferencetothedataadapterthatisassociatedwiththeDataObjectobject,which,inthiscase,isanADOAdapterdataadapterobject.ThecodethenusestheCommandpropertyoftheADOAdapterobjecttodisplaytheSQLcommandtextinamessagebox:

varobjDataAdapter;

objDataAdapter=XDocument.DataObjects("CityList").QueryAdapterXDocument.UI.Alert("SQLcommandtext:"+objDataAdapter.Command);

Page 756: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryAdapterProperty(Index)

TheQueryAdapterpropertyreturnsareferencetoatypeofdataadapterobjectsuchastheADOAdapter,WebServiceAdapter,orXMLFileAdapterobject.ThispropertyisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaQueryAdapterpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheQueryAdapterproperty.

QueryAdapterpropertyasitappliestotheDataObjectobject.

QueryAdapterpropertyasitappliestotheXDocumentobject.

Page 757: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 758: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryAdapterProperty(XDocumentObject)

Aread-onlypropertythatreturnsareferencetothedataadapterobjectthatisassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.QueryAdapter

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 759: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 760: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksDataadapterobjectsprovidedifferentpropertiesandmethodsthatretrieveandsubmitdatatoexternaldatasources;thedataadapterthatisassociatedwithaformisdependentonthetypeofdatasourcethatwasusedwhentheformwasinitiallycreated.

TheQueryAdapterpropertyallowsyoutoaccessanInfoPathform'sprimarydatasource.Toaccessthedataadapterobjectsusedforaform'ssecondarydatasources,usetheDataObjectspropertyoftheXDocumentobject.

MicrosoftOfficeInfoPath2003supportsthreetypesofdataadapters:

1. ActiveXDataObjectsRepresentedbytheADOAdapterobject.

2. WebservicesRepresentedbytheWebServiceAdapterobject.

3. XMLfileRepresentedbytheXMLFileAdapterobject.

NoteTheXMLFileAdapterobjectcannotbeusedwiththeQueryAdapterpropertyoftheXDocumentobject,itisonlyusedforsecondarydatasources.Toaccessaform'sunderlyingXMLdocument,usetheDOMpropertyoftheXDocumentobject.

Page 761: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theQueryAdapterpropertyoftheXDocumentobjectisusedtosetareferencetotheADOAdapterdataadapterobject;thentheCommandpropertyoftheADOAdapterobjectisusedtodisplaytheSQLcommandtextinamessagebox:

varobjADOAdapter;

objADOAdapter=XDocument.QueryAdapter;XDocument.UI.Alert("SQLcommandtext:"+objADOAdapter.Command);

Page 762: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 763: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryAllowedProperty(ADOAdapterObject)

Aread-onlypropertyoftypeBooleanthatalwaysreturnsTrue,correspondingtothequeryAllowedattributeintheformdefinitionfile(.xsf).

expression.QueryAllowed

expressionAnexpressionthatreturnsanADOAdapterobject.

Page 764: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 765: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 766: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 767: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryAllowedProperty(DAVAdapterObject)

Aread-onlypropertyoftypeBooleanthatalwaysreturnsFalse,correspondingtothequeryAllowedattributeintheformdefinitionfile(.xsf).

expression.QueryAllowed

expressionAnexpressionthatreturnsaDAVAdapterobject.

Page 768: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 769: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 770: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 771: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryAllowedProperty(EmailAdapterObject)

Aread-onlypropertyoftypeBooleanthatalwaysreturnsFalse,correspondingtothequeryAllowedattributeintheformdefinitionfile(.xsf).

expression.QueryAllowed

expressionAnexpressionthatreturnsanEmailAdapterobject.

Page 772: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 773: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 774: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 775: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryAllowedProperty(HWSAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluethatisalwaysFalse,correspondingtothequeryAllowedattributeintheformdefinitionfile(.xsf).

expression.QueryAllowed

expressionAnexpressionthatreturnsanHWSAdapterobject.

Page 776: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 777: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 778: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 779: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryAllowedProperty(Index)

TheQueryAllowedpropertyreturnsavaluethatcorrespondstothequeryAllowedattributeintheformdefinitionfile(.xsf).ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaQueryAllowedpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheQueryAllowedproperty.

QueryAllowedpropertyasitappliestotheADOAdapterobject.

QueryAllowedpropertyasitappliestotheDAVAdapterobject.

QueryAllowedpropertyasitappliestotheEmailAdapterobject.

QueryAllowedpropertyasitappliestotheHWSAdapterobject.

QueryAllowedpropertyasitappliestotheSharepointListAdapterobject.

QueryAllowedpropertyasitappliestotheWebServiceAdapterobject.

QueryAllowedpropertyasitappliestotheXMLFileAdapterobject.

Page 780: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 781: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryAllowedProperty(SharePointListAdapterObject)

Aread-onlypropertyoftypeBooleanthatalwaysreturnsTrue,correspondingtothequeryAllowedattributeintheformdefinitionfile(.xsf).

expression.QueryAllowed

expressionAnexpressionthatreturnsaSharepointListAdapterObjectobject.

Page 782: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 783: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 784: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 785: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryAllowedProperty(WebServiceAdapterObject)

Aread-onlypropertyoftypeBooleanthatcorrespondstothequeryAllowedattributeintheformdefinitionfile(.xsf).ThedefaultvalueisFalse.

expression.QueryAllowed

expressionAnexpressionthatreturnsaWebServiceAdapterobject.

Page 786: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 787: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 788: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 789: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryAllowedProperty(XMLFileAdapterObject)

Aread-onlypropertyoftypeBooleanthatalwaysreturnsTrue,correspondingtothequeryAllowedattributeintheformdefinitionfile(.xsf).

expression.QueryAllowed

expressionAnexpressionthatreturnsanXMLFileAdapterobject.

Page 790: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 791: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 792: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 793: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ReturnMessageProperty

Setsorretrievesastringvalueindicatingtheerrormessagethatwillbereturnedifthedatavalidationeventisnotsuccessful.

expression.ReturnMessage

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

Page 794: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 795: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsedinconjunctionwiththeReturnStatuspropertyoftheDataDOMEventobject,theReturnStatuspropertydisplaysamessageboxtotheuserwiththespecifiedtextmessage.

Page 796: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theReturnMessagepropertyoftheDataDOMEventobjectisusedtodisplayamessagetotheuserifthedatavalidationfortheXMLDOMnodefails:

functionmsoxd__id_attr::OnBeforeChange(eventObj){if(eventObj.NewValue==""){eventObj.ReturnMessage="Youmustsupplyavalueforthisfield.";eventObj.ReturnStatus=false;return;}}

Page 797: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 798: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ReturnStatusProperty(DataDOMEventObject)

SetsorretrievesaBooleanvalueindicatingthereturnstatusofthedatavalidationevent.

expression.ReturnStatus

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

Page 799: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 800: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheReturnStatuspropertyissettoFalse,thechangestotheXMLDocumentObjectModel(DOM)nodearenotacceptedandthedatavalidationeventfails.IfsettoTrue,nodatavalidationerrorhasoccurredandthedatavalidationeventissuccessful.

Page 801: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theReturnStatuspropertyoftheDataDOMEventobjectisusedtoindicatethatthedatavalidationeventwasnotsuccessful.ThecodealsousestheReturnMessagepropertyoftheDataDOMEventobjecttodisplayamessagetotheuser.

functionmsoxd__id_attr::OnBeforeChange(eventObj){if(eventObj.NewValue==""){eventObj.ReturnMessage="Youmustsupplyavalueforthisfield.";eventObj.ReturnStatus=false;return;}}

Page 802: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ReturnStatusProperty(DocActionEventObject)

SetsorretrievesaBooleanvalueindicatingthereturnstatusoftheOnClickevent.

expression.ReturnStatus

expressionRequired.ReturnsareferencetotheDocActionEventobject.

Page 803: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 804: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheReturnStatuspropertyissettoFalse,theOnClickeventfails.IfsettoTrue,theOnClickeventissuccessful.ThedefaultvalueisTrue.

NoteSettingtheReturnStatuspropertytofalsewillcauseamessageboxtobedisplayedwhichindicateswhathasfailed.

Page 805: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theReturnStatuspropertyoftheDocActionEventobjectisusedtoindicatethattheOnClickeventwasnotsuccessful:

functionDocActionEventCancel::OnClick(eventObj){//Canceltheevent.eventObj.ReturnStatus=false;}

Page 806: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ReturnStatusProperty(DocReturnEventObject)

SetsorretrievesaBooleanvalueindicatingthereturnstatusoftheOnLoadandOnSubmitRequestevents.

expression.ReturnStatus

expressionRequired.ReturnsareferencetotheDocReturnEventobject.

Page 807: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 808: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheReturnStatuspropertyissettoFalse,theOnLoadandOnSubmitRequesteventsfail.IfsettoTrue,theOnLoadandOnSubmitRequesteventsaresuccessful.ThedefaultvaluefortheOnLoadeventisTrue,andthedefaultvaluefortheOnSubmitRequesteventisFalse.

Page 809: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theReturnStatuspropertyoftheDocReturnEventobjectisusedtoindicatethattheOnLoadeventwasnotsuccessful:

functionXDocument::OnLoad(eventObj){//Canceltheevent.eventObj.ReturnStatus=false;}

Page 810: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ReturnStatusProperty(Index)

TheReturnStatuspropertyreturnsaBooleanvalueindicatingwhetherthechangesthatoccurredduringtheeventareacceptedorrejected.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaReturnStatuspropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheReturnStatusproperty.

ReturnStatuspropertyasitappliestotheDataDOMEventobject.

ReturnStatuspropertyasitappliestotheDocActionEventobject.

ReturnStatuspropertyasitappliestotheDocReturnEventobject.

ReturnStatuspropertyasitappliestotheMergeEventobject.

ReturnStatuspropertyasitappliestotheSaveEventobject.

ReturnStatuspropertyasitappliestotheVersionUpgradeEventobject.

Page 811: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ReturnStatusProperty(MergeEventObject)

Aread-writepropertythatsetsorretrievesaBooleanvalueindicatingthereturnstatusoftheOnMergeRequestevent.

expression.ReturnStatus

expressionRequired.AnexpressionthatreturnsareferencetoaMergeEventobject.

Page 812: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 813: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedefaultvalueoftheReturnStatuspropertyoftheMergeEventobjectisFalse.IfthispropertyisnotsettoTrue,theeventhandlerfortheOnMergeRequesteventwillfail.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 814: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ReturnStatusProperty(SaveEventObject)

SetsorretrievesaBooleanvalueindicatingthereturnstatusoftheOnSaveRequestevent.

expression.ReturnStatus

expressionRequired.AnexpressionthatreturnsareferencetoaSaveEventobject.

Page 815: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 816: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 817: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ReturnStatusProperty(SignEventObject)

SetsorretrievesaBooleanvalueindicatingthereturnstatusoftheOnSignevent.

expression.ReturnStatus

expressionRequired.AnexpressionthatreturnsareferencetoaSignEventobject.

Page 818: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 819: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 820: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ReturnStatusProperty(VersionUpgradeEventObject)

SetsorretrievesaBooleanvalueindicatingthereturnstatusoftheOnVersionUpgradeevent.

expression.ReturnStatus

expressionRequired.ReturnsareferencetotheVersionUpgradeEventobject.

Page 821: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 822: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheReturnStatuspropertyissettoFalse,theOnVersionUpgradeeventfailsandtheformisnotopened.IfsettoTrue,theOnVersionUpgradeeventissuccessful.

Page 823: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theReturnStatuspropertyoftheVersionUpgradeEventobjectisusedtoindicatethattheOnVersionUpgradeeventwasnotsuccessful:

functionXDocument::OnVersionUpgrade(eventObj){//Canceltheevent.eventObj.ReturnStatus=false;}

Page 824: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RoleProperty

Setsorretrievestheuser'scurrentrole.

expression.Role

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 825: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 826: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 827: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theRolepropertyisusedtodeterminethecurrentuser'srole.

varstrCurrentRole=XDocument.Role;

Page 828: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RollBackProperty(MergeEventobject)

Aread/writepropertythatprovidesadditionalinformationtotheOnMergeRequesteventalongwiththeReturnStatuspropertyflag.

expression.RollBack

expressionRequired.AnexpressionthatreturnsareferencetoaMergeEventobject.

Page 829: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 830: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheReturnStatuspropertyoftheMergeEventobjectissettoTrue,thispropertyisignored.

IftheReturnStatuspropertyisFalseandtheRollBackpropertyisTrue,theentiremergingoperationwillbecancelledandrolledbacktothestatebeforetheoperationwasinitiated.IftheRollBackpropertyisFalse,mergingthecurrentformwillfail,butthemergingoperationwillcontinuewiththenextform.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 831: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theRollBackpropertyoftheMergeEventobjectisusedtorollbacktheentireoperationifamergefails.

try{XDocument.ImportDOM(eventObj.DOM)}catch(ex){eventObj.ReturnStatus=false;eventObj.RollBack=true;}

Page 832: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShortErrorMessageProperty

SetsorretrievesthestringvaluecontainingtheshorterrormessageofanErrorobject.

expression.ShortErrorMessage

expressionRequired.AnexpressionthatreturnsareferencetotheErrorobject.

Page 833: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 834: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheshorterrormessageistheToolTipthatusersviewwhendatavalidationfailsintheirforms.

Page 835: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theShortErrorMessagepropertyoftheErrorobjectisusedtodisplaytheshortmessageofanerrorinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errorname:"+objError.ShortErrorMessage);

Page 836: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 837: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignatureBlockXmlNodeProperty

Aread-onlypropertythatreturnstheXMLnodecorrespondingadigitalsignature.

expression.SignatureBlockXmlNode

expressionRequired.AnexpressionthatreturnsaSignatureobject.

Page 838: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 839: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 840: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignatureContainerProperty

Aread-onlypropertythatreturnstherootXMLnodeofthesubtreecontainingthesignaturesintheSignedDataBlockobject.

expression.SignatureContainer

expressionRequired.AnexpressionthatreturnsareferencetotheSignedDataBlockobject.

Page 841: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 842: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 843: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignatureRelationProperty

Aread-onlypropertythatreturnstherelationamongmultiplesignaturesoftheSignedDataBlockobject,expressedasXdSignatureRelationenumeratedconstants.

expression.SignatureRelation

expressionRequired.AnexpressionthatreturnsareferencetotheSignedDataBlockobject.

Page 844: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 845: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 846: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignaturesProperty

Aread-onlypropertythatreturnsareferencetotheSignaturescollectionassociatedwiththeSignedDataBlockobject.

expression.Signatures

expressionRequired.AnexpressionthatreturnsareferencetotheSignedDataBlockobject.

Page 847: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 848: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 849: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignedDataBlockProperty

Aread-onlypropertythatreturnsthesigneddatablockthattriggerstheOnSignevent.

expression.SignedDataBlock

expressionRequired.AnexpressionthatreturnsaSignEventobject.

Page 850: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 851: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 852: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignedDataBlocksProperty

Aread-onlypropertythatreturnsareferencetotheSignedDataBlockscollectionthatisassociatedwithanXDocumentobject.

expression.SignedDataBlocks

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 853: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 854: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheSignedDataBlockspropertyisusedtoobtainareferencetotheSignedDataBlockscollection.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 855: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 856: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SiteProperty

Aread-onlypropertythatreturnsareferencetotheXMLDocumentObjectModel(DOM)nodewherethedatavalidationeventiscurrentlybeingprocessed.

expression.Site

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

Page 857: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 858: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfteryouhavesetareferencetotheXMLDOMnodethattheSitepropertyreturns,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

Page 859: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheDataValidationdevelopersampleform,theSitepropertyoftheDataDOMEventobjectisusedtocheckthevalueoftheXMLDOMnode;ifitmatchescertaincriteria,anerroriscreated:

functionmsoxd__itemB_quantityListB::OnValidate(eventObj){if(parseInt(eventObj.Site.nodeTypedValue,10)>50)eventObj.ReportError(eventObj.Site,"Invalidquantity."+"Thetotalnumberofeachtypeofblockcannotexceed50.",false);

if(parseInt(eventObj.Site.nodeTypedValue,10)<0)eventObj.ReportError(eventObj.Site,"Invalidquantity."+"Thetotalnumberofeachtypeofblockcannotbelessthan0.",false);}

Page 860: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 861: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SiteUrlProperty

Aread-onlypropertyreturningtheUniformResourceLocator(URL)oftheWindowsSharePointServicessitethattheSharepointListAdapterwillquery.

expression.SiteUrl

expressionRequired.AnexpressionthatreturnsareferencetoaSharePointListAdapterobject.

Page 862: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 863: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 864: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleshowshowtousetheSiteUrlpropertyofaSharePointListAdapterobjecttostoretheURLlocationinalocalvariable:

varstrSiteURL=XDocument.DataAdapters["Announcements"].SiteUrl

Page 865: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 866: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SolutionProperty

Aread-onlypropertythatreturnsareferencetotheSolutionobjectthatisassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.Solution

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 867: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 868: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheSolutionobjectprovidesaccesstoinformationaboutaform'sassociatedformdefinition(.xsf)file,includingaccesstoanXMLDocumentObjectModel(DOM)thatcontainsallofthesourceXMLofthe.xsffile.

Page 869: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSolutionpropertyoftheXDocumentobjectisusedtoloadavariablewiththeXMLcontentsofthe.xsffile:

varstrXSF;strXSF=XDocument.Solution.DOM.xml;

Page 870: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 871: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SolutionVersionProperty

Aread-onlypropertythatreturnsastringcontainingtheversionnumberofaMicrosoftOfficeInfoPath2003formtemplate.

expression.SolutionVersion

expressionRequired.AnexpressionthatreturnsareferencetotheVersionUpgradeEventobject.

Page 872: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 873: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThispropertycanbeusedonlyduringtheOnVersionUpgradeevent.

Page 874: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSolutionVersionpropertyoftheVersionUpgradeEventobjectisusedtodisplaytheversionnumberofanInfoPathformtemplateinamessagebox:

functionXDocument::OnVersionUpgrade(eventObj){XDocument.UI.Alert("Theformversion:"+eventObj.DocumentVersion+"\nTheformtemplateversion:"+eventObj.SolutionVersion);eventObj.ReturnStatus=true;}

Page 875: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 876: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SourceProperty(DataDOMEventObject)

Aread-onlypropertythatreturnsareferencetotheXMLDocumentObjectModel(DOM)wherethedatavalidationeventisoccurring.

expression.Source

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

Page 877: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 878: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAferyouhavesetareferencetotheXMLDOMnodethattheSourcepropertyreturns,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

Page 879: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheStructuralEditingdevelopersampleform,theSourcepropertyoftheDataDOMEventobjectisusedtoreturnareferencetotheXMLDOMnodethatcausedtheinitialchange.Ifthenodenamematchescertaincriteria,acustomfunctioniscalled.

functionmsoxd__quantity::OnAfterChange(eventObj){if(!eventObj.IsUndoRedo&&eventObj.Source.nodeName!="item")Calculate(eventObj.Site.parentNode);}

Page 880: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 881: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SourceProperty(DocActionEventObject)

Aread-onlypropertythatreturnsareferencetotheinner-mostXMLDocumentObjectModel(DOM)nodeofaform'sunderlyingXMLdocument.

expression.Source

expressionRequired.ReturnsareferencetotheDocActionEventobject.

Page 882: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 883: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfteryouhavesetareferencetotheXMLDOMnodethattheSourcepropertyreturns,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

Page 884: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSourcepropertyoftheDocActionEventobjectisusedtodisplaythesourceXMLdataoftheXMLDOMnodeinamessagebox:

functionDocActionEventSource::OnClick(eventObj){XDocument.UI.Alert("Source:"+eventObj.Source.xml);}

Page 885: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 886: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SourceProperty(Index)

TheSourcepropertyreturnsareferencetotheXMLDocumentObjectModel(DOM)nodecontainingthesourceXMLofthedatabeingchangedduringanevent.ThispropertyisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaSourcepropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheSourceproperty.

SourcepropertyasitappliestotheDataDOMEventobject.

SourcepropertyasitappliestotheDocActionEventobject.

Page 887: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 888: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

StatusProperty(CertificateObject)

Aread-onlypropertythatreturnsthestatusofthedigitalcertificate.ThestatusthatisreturnedisoneoftheXdCertificateStatusenumeratedconstants.

expression.Status

expressionRequired.AnexpressionthatreturnsaCertificateobject.

Page 889: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 890: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 891: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

StatusProperty(Index)

ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaStatuspropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheStatusproperty.

StatuspropertyasitappliestotheCertificateobject.

StatuspropertyasitappliestotheSignatureobject.

Page 892: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 893: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

StatusProperty(SignatureObject)

Aread-onlypropertythatreturnsthestatusofthespecifieddigitalsignature.ThestatusthatisreturnedisbasedontheXdSignatureStatusenumeration

expression.Status

expressionRequired.AnexpressionthatreturnsaSignatureobject.

Page 894: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 895: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheStatuspropertyonlyverifieswhetherthehashofthedigitalsignatureisvalid.Itdoesnotverifythechainoftrustofthedigitalcertificate,nordoesitverifythattheimageoftheviewcapturedatthetimethesignaturewasaddedmatchesthecurrentviewofthesignedform.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 896: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubjectProperty(EmailAdapterObject)

Returnsorsetsastringthatrepresentsthesubjectofthee-mailmessageassociatedwiththespecifiedEmailAdapterobject.

expression.Subject

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

Page 897: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 898: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 899: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThisexampleshowshowtousetheSubjectpropertyofaninstanceoftheEmailAdapterobjecttochangethesubjectofthee-mailmessagebeforetheEmailAdapterobjectissubmitted:

objEmailAdapter.Subject="WeeklyStatusReport";

Page 900: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubjectProperty(MailEnvelopeObject)

SetsorretrievesastringcontainingthesubjectvalueusedintheMailEnvelopeobjectthatisassociatedwithaWindowobject.

expression.Subject

expressionRequired.AnexpressionthatreturnsareferencetotheMailEnvelopeobject.

Page 901: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 902: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheMailEnvelopeobjectdoesnotsupporttheprogrammaticcreationofthebodyofane-mailmessage.Usersenterthebodytextafterthee-mailmessageisdisplayedinthedefaulte-maileditor.

Page 903: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSubjectpropertyoftheMailEnvelopeobjectisusedtosetthesubjectvalueofacustome-mailmessage:

functionCreateMailEnvelope::OnClick(eventObj){varobjEmail;

objEmail=Application.ActiveWindow.MailEnvelope;objEmail.To="[email protected]";objEmail.CC="[email protected]";objEmail.BCC="[email protected]";objEmail.Subject="Teste-mailmessage";objEmail.Visible=true;objEmail=null;}

Page 904: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 905: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitAllowedProperty(ADOAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluecorrespondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoanADOAdapterobject.

Page 906: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 907: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedefaultvalueoftheSubmitAllowedpropertyisFalse,asisthedefaultvalueforthesubmitAllowedattribute.IfthesubmitAllowedattributeissettoTrue,theADOconnectionsupportssubmittingdataaswellasquerying.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 908: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 909: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitAllowedProperty(DAVAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluethatalwaysreturnsFalse,correspondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoaDAVAdapterobject.

Page 910: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 911: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 912: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 913: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitAllowedProperty(EmailAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluethatalwaysreturnsTrue,correspondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

Page 914: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 915: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 916: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 917: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitAllowedProperty(HWSAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluethatisalwaysTrue,correspondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoaHWSAdapterobject.

Page 918: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 919: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 920: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitAllowedProperty(Index)

TheSubmitAllowedpropertyreturnsavaluethatcorrespondstothesumitAllowedattributeintheformdefinitionfile(.xsf).ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaSubmitAllowedpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheSubmitAllowedproperty.

SubmitAllowedpropertyasitappliestotheADOAdapterobject.

SubmitAllowedpropertyasitappliestotheDAVAdapterobject.

SubmitAllowedpropertyasitappliestotheEmailAdapterobject.

SubmitAllowedpropertyasitappliestotheHWSAdapterobject.

SubmitAllowedpropertyasitappliestotheSharepointListAdapterobject.

SubmitAllowedpropertyasitappliestotheWebServiceAdapterobject.

SubmitAllowedpropertyasitappliestotheXMLFileAdapterobject.

Page 921: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 922: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitAllowedProperty(SharePointListAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluecorrespondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).AlwaysreturnsFalsefortheSharePointListAdapterobject.

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoaSharepointListAdapterobject.

Page 923: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 924: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 925: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 926: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitAllowedProperty(WebServiceAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluecorrespondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).ThedefaultvalueisFalse.

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

Page 927: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 928: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 929: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 930: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitAllowedProperty(XMLFileAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluethatalwaysreturnsFalse,correspondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoanXMLFileAdapterobject.

Page 931: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 932: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 933: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TaskPanesProperty

Aread-onlypropertythatreturnsareferencetotheTaskPanescollectionthatisassociatedwiththeWindowobject.

expression.TaskPanes

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

Page 934: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 935: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheTaskPanespropertycanbeusedonlywiththeeditingwindowtypes;ifusedwithadesigningwindowtype,itwillreturnanerror.

Page 936: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theTaskPanespropertyoftheWindowobjectisusedtosetareferencetotheTaskPanescollection:

varobjTaskPanes;

objTaskPanes=Application.ActiveWindow.TaskPanes;

Page 937: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 938: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TimeoutProperty(ADOAdapterObject)

SetsorretrievesthelongintegertimeoutvalueforanADOAdapterobject.

expression.Timeout

expressionRequired.AnexpressionthatreturnsareferencetotheADOAdapterobject.

Page 939: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 940: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheTimeoutpropertyoftheADOAdapterobjectcontainsthetimeoutvaluethatisusedbytheADOdataadaptertoregulatethetimeusedtosubmitandretrievedatafromanActiveXDataObjects/OLEDBexternaldatasource.

NoteTheADOAdapterobjectislimitedtoworkonlywithMicrosoftSQLServerandMicrosoftAccessdatabases.

Page 941: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theTimeoutpropertyoftheADOAdapterobjectisusedtodisplaythetimeoutvalueoftheADOdataadapterinamessagebox:

varobjADOAdapter;

objADOAdapter=XDocument.DataObjects("CityList").QueryAdapter;XDocument.UI.Alert("SQLcommandtext:"+objADOAdapter.Timeout

Page 942: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 943: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TimeoutProperty(Index)

TheTimeoutpropertysetsorretrievesthetime-outvalueforsometypesofdataadapters.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaTimeoutpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheTimeoutproperty.

TimeoutpropertyasitappliestotheADOAdapterobject.

TimeoutpropertyasitappliestotheWebServiceAdapterobject.

Page 944: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TimeoutProperty(WebServiceAdapterObject)

Setsorretrievesthelongintegertime-outvalueinsecondsforaWebServiceAdapterobject.

expression.Timeout

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

Page 945: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 946: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedefaultvalueoftheTimeoutpropertyoftheWebServiceAdapterobjectis30seconds.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 947: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ToProperty(EmailAdapterObject)

Returnsorsetsastringthatrepresentstherecipientsforthee-mailmessageassociatedwithaspecifiedEmailAdapterobject.

expression.To

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

Page 948: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 949: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevaluemustbeasemicolon-delimitedstringthatcanberesolvedintoalistofvalide-mailaddressesbytheuser'se-mailclient.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 950: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThisexampleshowshowtousetheTopropertyofaninstanceoftheEmailAdapterobjecttochangetherecipientsofane-mailmessagebeforetheEmailAdapterobjectissubmitted:

objEmailAdapter.To=objEmailAdapter.To+";[email protected]";

Page 951: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ToProperty(Index)

TheTopropertyreturnsorsetstherecipientsofane-mailmessage.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaTopropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheToproperty.

TopropertyasitappliestotheEmailAdapterobject.

TopropertyasitappliestotheMailEnvelopeobject.

Page 952: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ToProperty(MailEnvelopeObject)

Setsorretrievesastringcontainingthesend-tovalueusedintheMailEnvelopeobjectthatisassociatedwithaWindowobject.

expression.To

expressionRequired.AnexpressionthatreturnsareferencetotheMailEnvelopeobject.

Page 953: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 954: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevaluessetfortheTopropertyshouldbeastringofvalide-mailaddresses.Youcanspecifymultiplee-mailaddressesbyusing";"betweeneachofthem,asshowninthefollowingexample:

objEmail.To="[email protected];[email protected]"

Page 955: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theTopropertyoftheMailEnvelopeobjectisusedtosetthesend-tovalueofacustome-mailmessage:

functionCreateMailEnvelope::OnClick(eventObj){varobjEmail;

objEmail=Application.ActiveWindow.MailEnvelope;objEmail.To="[email protected]";objEmail.CC="[email protected]";objEmail.BCC="[email protected]";objEmail.Subject="Teste-mailmessage";objEmail.Visible=true;objEmail=null;}

Page 956: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TopProperty

Aread/writepropertyoftypelongintegerthatspecifiestheverticalpositionofthewindowrepresentedbytheWindowobject,measuredinpoints.

expression.Top

expressionRequired.AnexpressionthatreturnsareferencetoaWindowobject.

Page 957: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheToppropertywillreturnanerrorifitissetonawindowthatisminimizedormaximized.

SettingtheToppropertytoapositionthatisoffthescreen,willcausetheentirewindowtobedisplayedonthescreen.

Page 958: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 959: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 960: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TypeProperty(DocContextChangeEventObject)

Aread-onlypropertythatreturnsastringcontainingthetypeofcontextchangeeventthatoccurredwhentheOnContextChangeeventwastriggered.

expression.Type

expressionRequired.AnexpressionthatreturnsareferencetotheDocContextChangeEventobject.

Page 961: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 962: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAsdescribedintheOnContextChangeeventtopic,theTypepropertyreturnsonlythevalue"ContextNode"forcontextchangesinMicrosoftInfoPath2003ServicePack1.Nevertheless,ifcodeinaneventhandlerperformsactionsthatdependoncurrentfunctionality,thatcodeshouldstillbedesignedtocheckthevalueoftheTypeproperty,becausefutureversionsofInfoPathmayusedifferentvaluesfordifferentcontextchanges.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 963: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 964: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TypeProperty(ErrorObject)

Aread-onlypropertythatreturnsastringvaluecontainingthetypeofanErrorobject.

expression.Type

expressionRequired.AnexpressionthatreturnsareferencetotheErrorobject.

Page 965: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 966: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTherearethreetypesorerrors:

SCHEMA_VALIDATIONDatavalidationfailedasaresultofanXMLSchema–definedconstraint.

SYSTEM_GENERATEDDatavalidationfailedasaresultofconstraintsdefinedintheformdefinition(.xsf)fileorasaresultofscriptingcodecallingtheReportErrormethodoftheDataDOMEventobject.

USER_SPECIFIEDDatavalidationfailedasaresultofacustomscriptingerrorusingtheAddmethodoftheErrorscollection.

Page 967: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theTypepropertyoftheErrorobjectisusedtodisplaythetypeofanerrorinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errorname:"+objError.Type);

Page 968: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 969: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TypeProperty(HTMLTaskPaneObject)

Aread-onlypropertythatreturnsavalueindicatingthetypeoftaskpanerepresentedbytheHTMLTaskPaneobject,whichisalwaysacustomtaskpane.

expression.Type

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLTaskPaneobject.BasedontheXdTaskPaneTypeenumeration.

Page 970: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 971: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheTypepropertyoftheHTMLTaskPaneobjectisoneofthepropertiesinheritedfromtheTaskPaneobjectwhenthetypeofthetaskpaneis0,whichmeansthatitisthecustomtaskpane.

NoteTheTypepropertyisbasedontheXdTaskPaneTypeenumeration.TheseenumeratedvaluesarealsousedasargumentstotheItempropertyoftheTaskPanescollectionforreturningareferencetoaspecifiedtypeoftaskpane.

Page 972: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theItempropertyoftheTaskPanescollectionisusedtosetareferencetotheHTMLTaskPaneobjectthatrepresentsthecustomtaskpane.ThentheVisiblepropertyoftheHTMLTaskPaneobjectisusedtomakethecustomtaskpaneappearintheMicrosoftOfficeInfoPath2003userinterface.ThetypevalueofthecustomtaskpaneisthesameasthevaluepassedtotheItemproperty.

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes(0);objTaskPane.Visible=true;

Page 973: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TypeProperty(Index)

TheTypepropertyreturnsavalueindicatingthetypeoftheobject.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaTypepropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheTypeproperty.

TypepropertyasitappliestotheDocContextChangeEventobject.

TypepropertyasitappliestotheErrorobject.

TypepropertyasitappliestotheHTMLTaskPaneobject.

TypepropertyasitappliestotheTaskPaneobject.

TypepropertyasitappliestotheWindowobject.

Page 974: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 975: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TypeProperty(TaskPaneObject)

Aread-onlypropertythatreturnsavalueindicatingthetypeoftaskpanerepresentedbytheTaskPaneobject.

expression.Type

expressionRequired.AnexpressionthatreturnsareferencetotheTaskPaneobject.BasedontheXdTaskPaneTypeenumeration.

Page 976: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 977: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheTypepropertyoftheTaskPaneobjectreturns0,thetaskpaneisacustomtaskpane.IftheTypepropertyreturnsanyothervalue,thetaskpaneisabuilt-intaskpane.

NoteTheTypepropertyisbasedontheXdTaskPaneTypeenumeration.TheseenumeratedvaluesarealsousedasargumentstotheItempropertyoftheTaskPanescollectionforreturningareferencetoaspecifiedtypeoftaskpane.

Page 978: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theItempropertyoftheTaskPanescollectionisusedtosetareferencetotheTaskPaneobjectthatrepresentsthebuilt-inHelptaskpane.ThentheVisiblepropertyoftheTaskPaneobjectisusedtomaketheHelptaskpaneappearintheMicrosoftOfficeInfoPath2003userinterface.

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes.Item(4);objTaskPane.Visible=true;

Page 979: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 980: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TypeProperty(WindowObject)

Aread-onlypropertythatreturnsalongintegervaluethatindicatesthetypeofwindowthatisrepresentedbytheWindowobject.ThevaluereturnedisbasedontheXdWindowTypeenumeration.

expression.Type

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

Page 981: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 982: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheWindowobjectsrepresentthetwotypesofwindowsthatareusedintheInfoPathapplication:theeditingwindowthatisusedastheformareawhenauserfillsoutaform,andthedesigningwindowthatisusedasthedesignmodewhenauserdesignsaform.

Page 983: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theTypepropertyoftheWindowobjectisusedtodeterminethetypeofwindowthatisthecurrentlyactivewindow:

if(Application.ActiveWindow.Type==0)XDocument.UI.Alert("Theactivewindowisaneditingwindow.");elseXDocument.UI.Alert("Theactivewindowisadesigningwindow.");

Page 984: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UIProperty

ReturnsareferencetotheMicrosoftOfficeInfoPath2003UIobject.

expression.UI

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 985: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 986: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheUI(userinterface)objectprovidesanumberofmethodsthatcanbeusedtodisplaycustomandbuilt-indialogboxes.

Page 987: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theUIpropertyoftheXDocumentobjectisusedtodisplayasimplemessageboxusingtheAlertmethod:

XDocument.UI.Alert("Hereisthemessagetext.");

Page 988: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 989: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

URIProperty(Index)

TheURIpropertyreturnsastringvaluethatspecifiesaUniformResourceIdentifier(URI)location.ThispropertyisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaURIpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheURIproperty.

URIpropertyasitappliestotheSolutionobject.

URIpropertyasitappliestotheXDocumentobject.

Page 990: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 991: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

URIProperty(SolutionObject)

Aread-onlypropertythatreturnsastringvaluecontainingtheUniformResourceIdentifier(URI)ofaMicrosoftOfficeInfoPath2003formtemplate.

expression.URI

expressionRequired.AnexpressionthatreturnsareferencetoaSolutionobject.

Page 992: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 993: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevalueoftheURIpropertyoftheSolutionobjectcantaketheformofaUniformResourceLocator(URL)orUniformResourceName(URN),dependingonthelocationfromwhichtheformwasopened.

Page 994: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theURIpropertyoftheSolutionobjectisusedtodisplayaformtemplate'sURIinamessagebox:

XDocument.UI.Alert("URI:"+XDocument.Solution.URI);

Page 995: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 996: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

URIProperty(XDocumentObject)

Aread-onlypropertythatreturnsastringvaluecontainingtheUniformResourceIdentifier(URI)ofaMicrosoftOfficeInfoPath2003form.

expression.URI

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 997: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 998: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheURIpropertycanbeusedasthenameofaformwhenaccessedthroughtheXDocumentscollection,asshowninthefollowingexample:

Application.XDocuments(XDocument.URI);

Page 999: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theURIpropertyoftheXDocumentobjectisusedtodisplayaform'sURIinamessagebox:

XDocument.UI.Alert("URI:"+XDocument.URI);

Page 1000: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsableHeightProperty

Aread-onlypropertyoftypelongintegerthatreturnstheavailablescreenheight(themaximumnumberofpointstowhichyoucansettheheightofanInfoPathdocumentwindow.)

expression.UsableHeight

expressionRequired.AnexpressionthatreturnsareferencetoanApplicationobject.

Page 1001: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1002: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1003: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UsableWidthProperty

Aread-onlypropertyoftypelongintegerthatreturnstheavailablescreenwidth(themaximumnumberofpointstowhichyoucansetthewidthofanInfoPathdocumentwindow.)

expression.UsableWidth

expressionRequired.AnexpressionthatreturnsareferencetoanApplicationobject.

Page 1004: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1005: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1006: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UserProperty

Aread-onlypropertythatreturnsareferencetotheUserobject.

expression.User

expressionRequired.AnexpressionthatreturnsareferencetoanApplicationobject.

Page 1007: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1008: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1009: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UtilProperty

Read-onlypropertythatreturnsareferencetotheUtilobject.

expression.Util

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 1010: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1011: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1012: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1013: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

VersionProperty(ApplicationObject)

Aread-onlypropertythatreturnsastringcontainingtheMicrosoftOfficeInfoPath2003versionnumber.

expression.Version

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

Page 1014: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1015: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheversionnumberoftheapplicationdoesnotcontainthename.Toobtainthenameofanapplication,usetheNamepropertyoftheApplicationobject.

Toobtaintheversionnumberofaformtemplate,usetheVersionpropertyoftheSolutionobject.

Page 1016: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theVersionpropertyoftheApplicationobjectisusedtodisplaytheapplication'sversionnumberinamessagebox:

XDocument.UI.Alert("Applicationversion:"+Application.Version);

Page 1017: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

VersionProperty(Index)

TheVersionpropertyreturnsastringvaluethatspecifiesaversionnumber.ThispropertyisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaVersionpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheVersionproperty.

VersionpropertyasitappliestotheApplicationobject.

VersionpropertyasitappliestotheSolutionobject.

Page 1018: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1019: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

VersionProperty(SolutionObject)

Aread-onlypropertythatreturnsastringcontainingtheversionnumberofaMicrosoftOfficeInfoPath2003formtemplate.

expression.Version

expressionRequired.AnexpressionthatreturnsareferencetotheSolutionobject.

Page 1020: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1021: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksToobtaintheversionnumberoftheInfoPathapplication,usetheVersionpropertyoftheApplicationobject.

Page 1022: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theVersionpropertyoftheSolutionobjectisusedtodisplayaformtemplate'sversionnumberinamessagebox:

XDocument.UI.Alert("Formtemplateversion:"+XDocument.Solution.

Page 1023: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ViewProperty

Aread-onlypropertythatreturnsareferencetotheViewobjectassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.View

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 1024: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1025: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheViewobjectthattheViewpropertyaccessesrepresentstheviewthatiscurrentlyactiveinanInfoPathform.AfteryouhavesetareferencetotheViewobject,youcanaccessanyofitspropertiesandmethodstoprogrammaticallyinteractwiththeview.

Page 1026: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theViewpropertyoftheXDocumentobjectisusedtosetareferencetotheViewobject;then,usingtheNamepropertyoftheViewobject,itdisplaysthenameoftheviewinamessagebox:

varobjView;

objView=XDocument.View;XDocument.UI.Alert("Viewname:"+objView.Name);

Page 1027: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ViewInfosProperty

Aread-onlypropertythatreturnsareferencetotheViewInfoscollectionassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.ViewInfos

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 1028: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1029: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheViewInfoscollectioncontainsacollectionofViewInfoobjectsthatcontaininformationabouteachoftheviewsimplementedinanInfoPathform.

Page 1030: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theViewInfospropertyoftheXDocumentobjectisusedtosetareferencetotheViewInfoscollection;then,usingtheCountpropertyoftheViewInfoscollection,itloopsthroughthecollectiontodeterminethedefaultviewusingtheIsDefaultpropertyoftheViewInfoobject.Whenthedefaultviewisfound,thecodedisplaysthenameoftheviewinamessagebox.

varobjViewInfos;objViewInfos=XDocument.ViewInfos;for(i=0;i<objViewInfos.Count;i++){if(objViewInfos(i).IsDefault)XDocument.UI.Alert("Thedefaultviewis:"+objViewInfos(i).Name);}

Page 1031: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1032: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

VisibleProperty(HTMLTaskPaneObject)

SetsorretrievesaBooleanvalueindicatingthatthetaskpanerepresentedbytheHTMLTaskPaneobject,whichisalwaysacustomtaskpane,isvisibleintheMicrosoftOfficeInfoPath2003userinterface.

expression.Visible

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLTaskPaneobject.

Page 1033: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1034: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheVisiblepropertyoftheHTMLTaskPaneobjectisoneofthepropertiesinheritedfromtheTaskPaneobjectwhenthetypeofthetaskpaneis0,whichmeansthatitisthecustomtaskpane.

SettingtheVisiblepropertytoTruecausesthetaskpanetoappearintheuserinterface,andsettingittoFalsecausesittoberemovedfromtheuserinterface.

Page 1035: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theItempropertyoftheTaskPanescollectionisusedtosetareferencetotheHTMLTaskPaneobjectthatrepresentsthecustomtaskpane.ThentheVisiblepropertyoftheHTMLTaskPaneobjectisusedtomakethecustomtaskpaneappearintheInfoPathuserinterface.

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes(0);objTaskPane.Visible=true;

Page 1036: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

VisibleProperty(Index)

TheVisiblepropertyspecifiesorreturnsaBooleanvalueindicatingwhethertheuserinterfacecomponentrepresentedbytheobjectisvisibleintheuserinterface.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaVisiblepropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheVisibleproperty.

VisiblepropertyasitappliestotheHTMLTaskPaneobject.

VisiblepropertyasitappliestotheMailEnvelopeobject.

VisiblepropertyasitappliestotheTaskPaneobject.

Page 1037: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

VisibleProperty(MailEnvelopeObject)

SetsorretrievesaBooleanvaluethatindicatesthevisibilityofthecustome-mailmessagecreatedwiththeMailEnvelopeobjectthatisassociatedwithaWindowobject.

expression.Visible

expressionRequired.AnexpressionthatreturnsareferencetotheMailEnvelopeobject.

Page 1038: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1039: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksWhentheVisiblepropertyoftheMailEnvelopeobjectissettoTrue,thecustome-mailmessagewillbedisplayedusingthedefaulte-maileditor.Ifthereisnodefaulte-maileditorconfigured,theVisiblepropertywillreturnanerror.

Page 1040: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theVisiblepropertyoftheMailEnvelopeobjectisusedtodisplayacustome-mailmessageinthedefaulte-maileditor:

functionCreateMailEnvelope::OnClick(eventObj){varobjEmail;

objEmail=Application.ActiveWindow.MailEnvelope;objEmail.To="[email protected]";objEmail.CC="[email protected]";objEmail.BCC="[email protected]";objEmail.Subject="Teste-mailmessage";objEmail.Visible=true;objEmail=null;}

Page 1041: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1042: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

VisibleProperty(TaskPaneObject)

SetsorretrievesaBooleanvalueindicatingthatthetaskpanerepresentedbytheTaskPaneobjectisvisibleintheMicrosoftOfficeInfoPath2003userinterface.

expression.Visible

expressionRequired.AnexpressionthatreturnsareferencetotheTaskPaneobject.

Page 1043: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1044: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksSettingtheVisiblepropertytoTruecausesthetaskpanetoappearintheuserinterface,andsettingittoFalsecausesittoberemovedfromtheuserinterface.

Page 1045: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theItempropertyoftheTaskPanescollectionisusedtosetareferencetotheTaskPaneobjectthatrepresentsthebuilt-inHelptaskpane.ThentheVisiblepropertyoftheTaskPanesobjectisusedtomaketheHelptaskpaneappearintheInfoPathuserinterface.

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes(4);objTaskPane.Visible=true;

Page 1046: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

WidthProperty

Aread/writepropertyoftypelongintegerthatspecifiesthewidthofthewindowrepresentedbytheWindowobject,measuredinpoints.

expression.Width

expressionRequired.AnexpressionthatreturnsareferencetoaWindowobject.

Page 1047: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheWidthpropertywillreturnanerrorifitissetonawindowthatisminimizedormaximized.

TheWidthpropertycan'tbesettoavaluethatislargerthanthevaluereturnedbytheUsableWidthproperty.

Page 1048: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1049: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1050: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1051: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

WindowProperty(HTMLTaskPaneExternalObject)

Aread-onlypropertythatreturnsareferencetotheWindowobjectassociatedwithacustomtaskpane.

expression.Window

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLTaskPaneExternalobject.

Page 1052: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1053: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheWindowobjectreturnedbytheWindowpropertyrepresentsthecurrentlyactiveMicrosoftOfficeInfoPath2003windowthatisassociatedwiththecustomtaskpane.

Page 1054: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theHTMLTaskPaneExternalobjectisusedthroughtheexternalpropertyoftheDynamicHTML(DHTML)windowobjecttosetareferencetotheWindowobjectthatispartoftheInfoPathobjectmodel:

varobjWindow;

objWindow=window.external.Window;objWindow.MailEnvelope.Visible=true;

Page 1055: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

WindowProperty(Index)

TheWindowpropertyreturnsareferencetoaWindowobject.ThispropertyisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaWindowpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheWindowproperty.

WindowpropertyasitappliestotheHTMLTaskPaneExternalobject.

WindowpropertyasitappliestotheViewobject.

Page 1056: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1057: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

WindowProperty(ViewObject)

Aread-onlypropertythatreturnsareferencetothewindowobjectassociatedwithaview.

expression.Window

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

Page 1058: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1059: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheWindowobjectreturnedbytheWindowpropertyrepresentsthecurrentlyactiveMicrosoftOfficeInfoPath2003window.ItcanalsobeaccessedthroughtheWindowscollection.

Page 1060: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theWindowpropertyoftheViewobjectisusedtosetareferencetothefirsttaskpanecontainedintheTaskPanescollection:

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes(0);

Page 1061: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

WindowsProperty

Aread-onlypropertythatreturnsareferencetotheWindowscollection.

expression.Windows

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

Page 1062: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1063: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfteryouhavesetareferencetotheWindowscollection,youcanuseitspropertiestoaccesseachoftheWindowobjectsthatitcontains.

NoteTheWindowscollectioncanbeusedonlytogetthecountoftheWindowobjectsthatitcontainsortoreturnareferencetoaWindowobject.ItcannotbeusedtoaddorremoveWindowobjects.

Page 1064: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theWindowspropertyisusedtoaccesstheCountpropertyoftheWindowscollectionanddisplaythevalueinamessagebox:

XDocument.UI.Alert("CountofWindows:"+Application.Windows.Count);

Page 1065: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

WindowStateProperty

Aread/writepropertyoftypeXdWindowStatethatreturnsorsetsthestateofthewindowrepresentedbytheWindowobject.

expression.WindowState

expressionRequired.AnexpressionthatreturnsareferencetoaWindowobject.

Page 1066: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1067: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1068: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1069: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

WSDLURLProperty

Aread-onlypropertythatreturnsastringvaluecontainingtheUniformResourceLocator(URL)oftheWebServicesDescriptionLanguage(WSDL)filefortheWebserviceassociatedwiththeWebServiceAdapterobject.

expression.WSDLURL

expressionRequired.AnexpressionthatreturnsareferencetotheWebServiceAdapterobject.

Page 1070: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1071: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheWSDLfileisanXMLdocumentthatdefinestheformatofmessagesanXMLWebserviceunderstands.TheservicedescriptionservesasanagreementthatdefinesthebehaviorofanXMLWebserviceandinstructspotentialclientsinhowtointeractwithit.ThebehaviorofanXMLWebserviceisdeterminedbymessagingpatternsthattheservicedefinesandsupports.ThesepatternsconceptuallydictatewhattheserviceconsumercanexpecttohappenwhenaproperlyformattedmessageissubmittedtotheXMLWebservice.

Page 1072: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theWSDLURLpropertyoftheWebServiceAdapterobjectisusedtodisplaytheURLoftheWSDLfilethatisusedfortheWebservice:

varobjWSAdapter;

objWSAdapter=XDocument.DataObjects("WebCityList").QueryAdapter;XDocument.UI.Alert("WSDLfileURL:"+objWSAdapter.WSDLURL

Page 1073: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1074: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentProperty(DataDOMEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeDataDOMEventobjectduringadatavalidationevent.

expression.XDocument

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

Page 1075: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1076: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfteryouhavesetareferencetotheXDocumentobjectthattheXDocumentpropertyoftheDataDOMEventobjectreturns,youcanuseanyofthepropertiesandmethodsthatitprovides.

Page 1077: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theXDocumentpropertyoftheDataDOMEventobjectisusedtosetareferencetotheXDocumentobject:

varobjXDoc;

objXDoc=eventObj.XDocument;

Page 1078: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentProperty(DocActionEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeDocActionEventobjectduringanOnClickevent.

expression.XDocument

expressionRequired.ReturnsareferencetotheDocActionEventobject.

Page 1079: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1080: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfteryouhavesetareferencetotheXDocumentobjectthattheXDocumentpropertyoftheDocActionEventobjectreturns,youcanuseanyofthepropertiesandmethodsthatitprovides.

Page 1081: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theXDocumentpropertyoftheDocActionEventobjectisusedtosetareferencetotheXDocumentobject:

varobjXDoc;

objXDoc=eventObj.XDocument;

Page 1082: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentProperty(DocContextChangeEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeDocContextChangeEventobjectinanOnContextChangeevent.

expression.XDocument

expressionRequired.ReturnsareferencetoaDocContextChangeEventobject.

Page 1083: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1084: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1085: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentProperty(DocEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeDocEventobjectduringanOnSwitchVieworOnAfterChangeevent.

expression.XDocument

expressionRequired.ReturnsareferencetotheDocEventobject.

Page 1086: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1087: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfteryouhavesetareferencetotheXDocumentobjectthattheXDocumentpropertyoftheDocEventobjectreturns,youcanuseanyofthepropertiesandmethodsthatitprovides.

Page 1088: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theXDocumentpropertyoftheDocEventobjectisusedtosetareferencetotheXDocumentobject:

varobjXDoc;

objXDoc=eventObj.XDocument;

Page 1089: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentProperty(DocReturnEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeDocReturnEventobjectduringanOnLoadorOnSubmitRequestevent.

expression.XDocument

expressionRequired.ReturnsareferencetotheDocReturnEventobject.

Page 1090: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1091: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfteryouhavesetareferencetotheXDocumentobjectthattheXDocumentpropertyoftheDocReturnEventobjectreturns,youcanuseanyofthepropertiesandmethodsthatitprovides.

Page 1092: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theXDocumentpropertyoftheDocReturnEventobjectisusedtosetareferencetotheXDocumentobject:

varobjXDoc;

objXDoc=eventObj.XDocument;

Page 1093: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1094: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentProperty(HTMLTaskPaneExternalObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectassociatedwithacustomtaskpane.

expression.XDocument

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLTaskPaneExternalobject.

Page 1095: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1096: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheXDocumentobjectreturnedbytheXDocumentpropertyrepresentstheform'sunderlyingXMLdocumentthatisassociatedwiththecustomtaskpane.

Page 1097: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theHTMLTaskPaneExternalobjectisusedthroughtheexternalpropertyoftheDynamicHTML(DHTML)windowobjecttosetareferencetotheXDocumentobjectthatispartoftheInfoPathobjectmodel:

varobjXDoc;

objXDoc=window.external.XDocument;objXDoc.View.SwitchView("View2");

Page 1098: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentProperty(Index)

TheXDocumentpropertyreturnsareferencetoanXDocumentobject.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickanXDocumentpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheXDocumentproperty.

XDocumentpropertyasitappliestotheDataDOMEventobject.

XDocumentpropertyasitappliestotheDocActionEventobject.

XDocumentpropertyasitappliestotheDocContextChangeEventobject.

XDocumentpropertyasitappliestotheDocEventobject.

XDocumentpropertyasitappliestotheDocReturnEventobject.

XDocumentpropertyasitappliestotheHTMLTaskPaneExternalobject.

XDocumentpropertyasitappliestotheMergeEventobject.

XDocumentpropertyasitappliestotheSaveEventobject.

XDocumentpropertyasitappliestotheVersionUpgradeEventobject.

XDocumentpropertyasitappliestotheWindowobject.

Page 1099: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentProperty(InfoPathControlSiteObject)

RetrievesareferencetotheXDocumentobjectassociatedwiththeviewthatcontainsthecontrol.

expression.XDocument

expressionRequired.AnexpressionthatreturnsareferencetotheInfoPathControlobject.

Page 1100: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1101: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1102: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentProperty(MergeEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeMergeEventobjectinanOnMergeRequestevent.

expression.XDocument

expressionRequired.ReturnsareferencetoaMergeEventobject.

Page 1103: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1104: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1105: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentProperty(SignEventObject)

RetrievesareferencetotheXDocumentobjectassociatedwiththeOnSignevent.

expression.XDocument

expressionRequired.AnexpressionthatreturnsareferencetoaSignEventobject.

Page 1106: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1107: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1108: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentProperty(VersionUpgradeEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeVersionUpgradeEventobjectduringanOnVersionUpgradeevent.

expression.XDocument

expressionRequired.ReturnsareferencetotheVersionUpgradeEventobject.

Page 1109: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1110: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfteryouhavesetareferencetotheXDocumentobjectthattheXDocumentpropertyoftheVersionUpgradeEventobjectreturns,youcanuseanyofthepropertiesandmethodsthatitprovides.

Page 1111: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theXDocumentpropertyoftheVersionUpgradeEventobjectisusedtosetareferencetotheXDocumentobject:

varobjXDoc;

objXDoc=eventObj.XDocument;

Page 1112: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1113: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentProperty(WindowObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththewindowthatisrepresentedbytheWindowobject.

expression.XDocument

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

Page 1114: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1115: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheXDocumentpropertycanbeusedonlywiththeeditingwindowtypes;ifusedwithadesigningwindowtype,itwillreturnanerror.Itwillalsoreturnanerrorifnoformisopenintheformarea.

Page 1116: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theXDocumentpropertyoftheWindowobjectisusedtosetareferencetotheform'sunderlyingXMLdocumentthatisassociatedwiththecurrentlyactivewindow:

varobjXDoc;

objXDoc=Application.ActiveWindow.XDocument;

Page 1117: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentsProperty

Aread-onlypropertythatreturnsareferencetotheXDocumentscollection.

expression.XDocuments

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

Page 1118: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1119: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfteryouhavesetareferencetotheXDocumentscollection,youcanuseitspropertiestoaccesseachoftheXDocumentobjectsthatitcontains.

Page 1120: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theXDocumentspropertyisusedtoaccesstheCountpropertyoftheXDocumentscollectionanddisplaythevalueinamessagebox:

XDocument.UI.Alert("CountofXDocuments:"+Application.XDocuments

Page 1121: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1122: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XPathProperty

Aread-onlypropertythatreturnstheXPathexpressionofaSignedDataBlockobject.

expression.XPath

expressionRequired.AnexpressionthatreturnsareferencetoaSignedDataBlockobject.

Page 1123: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1124: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1125: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1126: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XPathNamespaceDeclarationsProperty

Aread-onlypropertycontainingthenamespacedeclarationsfortheXPathexpressionreturnedbytheXPathpropertyofaSignedDataBlockobject.

expression.XPathNamespaceDeclarations

expressionRequired.AnexpressionthatreturnsareferencetoaSignedDataBlockobject

Page 1127: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1128: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1129: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ActivateMethod

ActivatesthewindowthatisrepresentedbytheWindowobject.

expression.Activate()

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

Page 1130: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1131: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheActivatemethodcanbeusedonlywiththeeditingwindowtypes;ifusedwithadesigningwindowtype,itwillreturnanerror.

Todeterminewhetherawindowistheactivewindow,usetheActivepropertyoftheWindowobject.

Page 1132: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theActivatemethodoftheWindowobjectisusedtoactivateawindowthatisassociatedwiththeview.Notethecheckofthewindowtype.

varobjWindow;

//Setareferencetoaview'sassociatedwindow.objWindow=XDocument.View.Window;if(objWindow.Type==0){//Makethewindowtheactivewindow.objWindow.Activate();}

objWindow=null;

Page 1133: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1134: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AddMethod

AddsanErrorobjecttotheErrorscollectionandreturnsareferencetothenewErrorobject.

expression.Add(ByValvarNodeAsVariant,ByValbstrConditionNameAsString,ByValbstrShortErrorMessageAsString,[ByValbstrDetailedErrorMessageAsString],[ByVallErrorCodeAsLong],[ByValbstrTypeAsString="modeless"])AsError

expressionRequired.AnexpressionthatreturnsareferencetotheErrorscollection.

varNodeRequiredVariant.TheXMLnodethattheerrorwillbeassociatedwith.

bstrConditionNameRequiredString.Thenameoftheerror.

bstrShortErrorMessageRequiredString.Theshortmessagefortheerror.

bstrDetailedErrorMessageOptionalString.Thedetailedmessagefortheerror.

lErrorCodeOptionalLongInteger.Defaultvalueis0.Theerrorcodeoftheerror.

bstrTypeOptionalString.Defaultvalueis"modeless".Thetypeoferrorprocessing.Theothersupportedvalueis"modal".

returnsAreferencetothenewlycreatedErrorobject.

Page 1135: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1136: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheAddmethodisusedtocreatecustomerrormessagesinaMicrosoftOfficeInfoPath2003form.TherearetwotypesoferrorsthatcanbecreatedusingtheAddmethod:

modelessTheuserisnotifiedoftheerrorwithaninlinealertandcanchoosetoreturntothepreviousvaluewithanundooperation.

modalTheuserisnotifiedoftheerrorwithadialogboxalert.AfterclickingOKinthedialogboxalert,theerrorwillappearasaninlinealertandtheusercanchoosetoreturntothepreviousvaluewithanundooperation.

NoteCustomerrorscanalsobecreatedusingtheReportErrormethodoftheDataDOMEventobject.

Page 1137: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theAddmethodoftheErrorscollectionisusedtocreateacustomerrormessage:

varobjErrors;varobjError;

objErrors=XDocument.Errors;objError=objErrors.Add(MyXMLNode,"ValidationError","Thedataisinvalid.");

Page 1138: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AlertMethod

DisplaysamessageboxwithacustomtextmessageinaMicrosoftOfficeInfoPath2003form.

expression.Alert(ByValbstrAlertStringAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheUIobject.

bstrAlertStringRequiredString.Thetexttobedisplayed.

Page 1139: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1140: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheAlertmethoddisplaysasimplemessageboxthatusesaninformationiconandanOKbutton.Onlythetextinthemessageboxcanbecustomized.

NoteCarriagereturnscanbeinsertedintothetextofthecustommessagebyusingthestandard\ncharacters.

Page 1141: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theAlertmethodoftheUIobjectisusedtodisplayamessagebox:

XDocument.UI.Alert("Custommessagetextgoeshere.");

Page 1142: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AvgMethod

ReturnsaVariantthatistheaveragevalueofallofthenumericalelementsinanodeset.

expression.Avg(ByValpxmllistInputAsIXMLDOMNodeList)AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheMathobject.

pxmllistInputRequiredIXMLDOMNodeList.Thenodesetthatcontainsthevaluestobeaveraged.

returnsAVariantthatrepresentstheaveragevalueofallthenumericalelementsinanodeset.

Page 1143: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Security0:Canbeaccessedwithoutrestrictions.

Page 1144: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1145: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,thevariableaverageAgeissettotheaveragevalueofallofthenumericalelementsinthemy:agesnodeset.

varages=XDocument.DOM.selectNodes("//my:ages");varaverageAge=XDocument.Util.Math.Avg(ages);

Page 1146: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

BuildSQLFromXMLNodesMethod

ReturnsastringcontaininganSQLcommandtextfragmentusingthespecifiedXMLnode.

expression.BuildSQLFromXMLNodes(ByRefpXmlNodeAsIXMLDOMNode)AsString

expressionRequired.AnexpressionthatreturnsareferencetotheADOAdapterobject.

pXmlNodeRequiredObject.TheXMLnodetobeconvertedtoanSQLfragment.

returnsString.

Page 1147: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1148: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefragmentofSQLthattheBuildSQLFromXMLNodesmethodgeneratesisanSQLWHEREclauseintheformoffield=value.TheXMLnodethatyouuseforthepXmlNodeargumentshouldbeadescendantofthedfs:queryFieldsnode;whenyouhavetheSQLcommandtextfragment,youcanaddittotheexistingSQLcommandstringoftheADOAdapterobjectusingtheCommandproperty.

Page 1149: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theBuildSQLFromXMLNodesmethodoftheADOAdapterobjectisusedtocreateanSQLcommandtextfragmentbasedonaspecifiedXMLnode.ThisexampleisbasedonaformthatusestheOrderstableintheMicrosoftSQLServerNorthwindsampledatabase.

functionQueryGreaterThan(){varobjQueryFieldNode;varstrWhereClause;varstrOldCommand;varobjQueryFieldAttributes;varobjCurQueryFieldAttribute;

//BuildtheWHEREclausefromtheQueryFieldsintheform's//underlyingXMLDOM.objQueryFieldNode=XDocument.DOM.selectSingleNode("dfs:myFields/dfs:queryFields/q:Orders");strWhereClause=XDocument.QueryAdapter.BuildSQLFromXMLNodes(objQueryFieldNode);

//Replacethe'='signswith'>=',andappendtheclauseto//theSQLcommandtext.strWhereClause=strWhereClause.replace(/=/,">=");strOldCommand=XDocument.QueryAdapter.Command;if(strWhereClause!=""){XDocument.QueryAdapter.Command=strOldCommand+"where"+strWhereClause;}

Page 1150: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

//CleartheQueryFieldssotheWHEREclauseisn't//automaticallygenerated.objQueryFieldAttributes=objQueryFieldNode.attributes;while(objCurQueryFieldAttribute=objQueryFieldAttributes.nextNode()){objCurQueryFieldAttribute.text="";}//Performthequery.try{XDocument.Query();}catch(e){XDocument.UI.Alert("Failedtoquery.\n\n"+e.message);}//Resetthecommandsothatsubsequentqueriesarebasedon//thecorrectSQLcommandtextstring.XDocument.QueryAdapter.Command=strOldCommand;

//Cleanup.objQueryFieldNode=null;strWhereClause=null;strOldCommand=null;objQueryFieldAttributes=null;objCurQueryFieldAttribute=null;

}

Page 1151: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1152: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CacheSolutionMethod(ApplicationObject)

Examinestheformtemplateinthecacheand,ifnecessary,updatesitfromthepublishedlocationoftheformtemplate.

expression.CacheSolution(ByValbstrSolutionURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetoanApplicationobject.

bstrSolutionURIRequiredString.ThestringthatspecifiestheUniformResourceIdentifier(URI)oftheformtemplate.Thisparametercanbespecifiedasaformdefinition(.xsf)fileoraformtemplate(.xsn)file.

Page 1153: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1154: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheformtemplatethatcurrentlyexistsinthecachematchestheformtemplatefromthepublishedlocation,nocachingtakesplace.Ifthecomputerisofflineandtheformisalreadyinthecache,thecacheiskeptandnoupdatewilloccur.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1155: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingVisualBasicforApplications(VBA)example,theCacheSolutionmethodoftheApplicationobjectisusedtocacheaformtemplate:

PublicSubCacheFormTemplate()

DimIAsIntegerDimobjAppAsObjectDimaryForms(2)AsString

'CreateareferencetotheApplicationobject.SetobjApp=CreateObject("InfoPath.Application")

'Populatethearraywithformtemplatelocations.aryForms(0)="\\MyServer\MyForms\MyForm.xsn"aryForms(1)="\\MyServer\MyForms\manifest.xsf"

'Loopthroughthearrayandcachetheformtemplates.ForI=0ToUBound(aryForms)-1objApp.CacheSolution(aryForms(I))NextI

EndSub

Page 1156: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1157: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CacheSolutionMethod(ExternalApplicationObject)

Examinestheformtemplateinthecacheand,ifnecessary,updatesitfromthepublishedlocationoftheformtemplate.

expression.CacheSolution(ByValbstrSolutionURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrSolutionURIRequiredString.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)oftheformtemplate.Thisparametercanbespecifiedasaformdefinition(.xsf)fileoraformtemplate(.xsn)file

Page 1158: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1159: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheformtemplatethatcurrentlyexistsinthecachematchestheformtemplatefromthepublishedlocation,nocachingtakesplace.Ifthecomputerisofflineandtheformisalreadyinthecache,thecacheiskeptandnoupdatewilloccur.

Page 1160: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theCacheSolutionmethodoftheExternalApplicationobjectisusedtocacheaformtemplate:

PublicSubCacheFormTemplate()

DimIAsIntegerDimobjExternalAppAsObjectDimaryForms(2)AsString

'CreateareferencetotheExternalApplicationobject.SetobjExternalApp=CreateObject("InfoPath.ExternalApplication")

'Populatethearraywithformtemplatelocations.aryForms(0)="\\MyServer\MyForms\MyForm.xsn"aryForms(1)="\\MyServer\MyForms\manifest.xsf"

'Loopthroughthearrayandcachetheformtemplates.ForI=0ToUBound(aryForms)-1objExternalApp.CacheSolution(aryForms(I))NextI

EndSub

Page 1161: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1162: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CacheSolutionMethod(Index)

TheCacheSolutionmethodexaminestheformtemplateinthecacheand,ifnecessary,updatesitfromthepublishedlocationoftheformtemplate.ThismethodisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaCacheSolutionmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheCacheSolutionmethod.

CacheSolutionmethodasitappliestotheApplicationobject.

CacheSolutionmethodasitappliestotheExternalApplicationobject.

Page 1163: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1164: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CloseMethod(ExternalApplicationObject)

ClosesthespecifiedMicrosoftOfficeInfoPath2003form.

expression.Close(ByValbstrDocumentURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrDocumentURIRequiredString.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)ofaform.

Page 1165: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1166: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheClosemethodclosesthecurrentlyopenformwithoutquittingtheInfoPathapplication.WhenusingtheClosemethod,theformisclosedunconditionally,meaningthatanychangesmadetothedataintheformarenotsaved.

Page 1167: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theClosemethodoftheExternalApplicationobjectisusedtoclosethecurrentlyopenform:

PublicSubAutomateInfoPathForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'OpenanInfoPathform.objIP.Open("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeenopened.")

'ClosetheInfoPathform.objIP.Close("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeenclosed.")

'QuittheInfoPathapplication.objIP.QuitMsgBox("TheInfoPathapplicationhasbeenclosed.")

SetobjIP=Nothing

EndSub

Page 1168: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CloseMethod(Index)

TheClosemethodclosestheitemassociatedwiththespecifiedcollectionorobject.ThismethodisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollectionsandobjects.ClickaClosemethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheClosemethod.

ClosemethodasitappliestotheExternalApplicationobject.

ClosemethodasitappliestotheWindowobject.

ClosemethodasitappliestotheXDocumentscollection.

Page 1169: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1170: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CloseMethod(WindowObject)

ClosesthewindowthatisrepresentedbytheWindowobject.

expression.Close([ByValbForceAsBoolean])

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

bForceOptionalBoolean.DefaultvalueisFalse.Determineswhetheropendocumentswillbesaved.

Page 1171: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1172: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheClosemethodwillclosetheassociatedwindowandtheformsthatitcontains.IfthebForceparameterissettoTrue,allformswillbeclosedwithoutsaving,eveniftheycontainchangessincetheywerelastsaved.IfsettoFalse,userswillbepromptedtosavetheirchanges.

TheClosemethodcanbeusedonlywiththeeditingwindowtypes;ifusedwithadesigningwindowtype,itwillreturnanerror.Inaddition,theClosemethodcanonlybeusedwiththeOnSubmitRequestandOnClickeventhandlers.Ifusedwithanyothertypeofeventhandler,itwillreturnanerror.

NoteIfthewindowbeingclosedistheonlywindowopeninMicrosoftOfficeInfoPath2003,theInfoPathapplicationwillalsobeclosed.

Page 1173: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theClosemethodoftheWindowobjectisusedtoclosethecurrentlyactivewindow,forcingasaveifchangesintheformhaveoccurred:

Application.ActiveWindow.Close(false);

Page 1174: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1175: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CloseMethod(XDocumentsCollection)

ClosesthespecifiedMicrosoftOfficeInfoPath2003form.

expression.Close(ByValvarIndexAsVariant)

expressionRequired.AnexpressionthatreturnsareferencetotheXDocumentscollection.

varIndexRequiredVariant.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)ofaform,alongintegervaluethatspecifiesthepositionalindexofanXDocumentobjectwithintheXDocumentscollection,orareferencetoanXDocumentobject.

Page 1176: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1177: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheClosemethodclosesthecurrentlyopenformwithoutquittingtheInfoPathapplication.Theformisclosedunconditionally,meaningthatanychangesmadetothedataintheformarenotsaved.

Page 1178: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theClosemethodoftheXDocumentscollectionisusedtoclosethecurrentlyopenformusingthepositionalindexofanXDocumentobjectcontainedinthecollection:

Application.XDocuments.Close(0);

Alternatively,youcanpassareferencetoanXDocumentobject:

varobjXDoc;

objXDoc=Application.XDocuments(0);Application.XDocuments.Close(objXDoc);

Page 1179: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ConfirmMethod

Displaysamessageboxwithbuttonsforinputfromauser.ThevaluethatisreturnedisoneoftheXdConfirmChoiceenumeratedconstants.

expression.Confirm(promptAsString,buttonsAsXdConfirmButtons)AsXdConfirmChoice

expressionRequired.AnexpressionthatreturnsareferencetotheUIobject

bstrPromptRequiredString.Thetextmessagetobedisplayed.

lButtonsRequiredXdConfirmButtons.Specifiesthenumberandtypeofbuttonstodisplay.YoumayspecifyanyofthevaluesoftheXdConfirmButtonsenumeration.

Page 1180: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Security2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1181: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1182: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Remarks

ExampleInthefollowingexample,theConfirmmethodoftheUIobjectisusedtodisplayadialogboxwithYesandNobuttons:

XDocument.UI.Confirm("Doyouwishtocontinue?",4);

Page 1183: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CreateMethod

CreatesanewSignatureobject.ThismethodcanbecalledonlyfromtheOnSigneventhandler.

expression.Create()

expressionRequired.AnexpressionthatreturnsaSignaturescollection.

Page 1184: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1185: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedigitalsignatureinnotactuallywrittentothefileuntiltheSignmethodiscalledforthenewlycreatedSignatureobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1186: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1187: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

CreateDOMMethod

CreatesanewinstanceoftheXMLDocumentObjectModel(DOM)inmemory.

expression.CreateDOM()AsXMLDOMDocument

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

returnsAreferencetotheXMLDOM.

Page 1188: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1189: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsingtheCreateDOMmethodtocreateaninstanceoftheXMLDOMisequivalenttousingthefollowingmethodofcreatingaMicrosoftXMLCoreServices(MSXML)5.0DOMDocumentobject:

varobjDoc=newActiveXObject("Msxml2.DOMDocument.5.0");NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1190: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theCreateDOMmethodoftheXDocumentobjectisusedtocreateaninstanceofXMLDOMandassignittoavariable.

varobjDOM=XDocument.CreateDOM();

Page 1191: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1192: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DeleteMethod

DeletesthespecifiedErrorobjectfromtheErrorscollection.

expression.Delete(ByValvarNodeAsVariant,ByValbstrConditionNameAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheErrorscollection.

varNodeRequiredVariant.TheXMLDocumentObjectModel(DOM)nodeassociatedwiththeerror.

bstrConditionNameRequiredString.Thenameoftheerror.

Page 1193: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1194: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheDeletemethoddeletesalltheErrorobjectsintheErrorscollectionthatareassociatedwiththespecifiedXMLnodeandthathavethesamename.TodeletealloftheErrorobjectscontainedintheErrorscollection,usetheDeleteAllmethod.

NoteTheDeletemethodwillonlydeleteerrorsthatwerecreatedusingtheAddmethodoftheErrorscollection.Itcannotbeusedtodeleteerrorsthatoccurbecauseofschemaordatavalidationconstraints,orerrorsthatwerecreatedusingtheReportErrormethodoftheDataDOMEventobject.

Page 1195: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theDeletemethodoftheErrorscollectionisusedtodeletealltheerrorsbasedontheirassociatedXMLnodeandname:

XDocument.Errors.Delete(MyXMLNode,"ValidationError");

Page 1196: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DeleteAllMethod

DeletesalloftheErrorobjectscontainedintheErrorscollection.

expression.DeleteAll()

expressionRequired.AnexpressionthatreturnsareferencetotheErrorscollection.

Page 1197: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1198: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTodeleteaspecificErrorobjectfromtheErrorscollection,usetheDeletemethod.

NoteUnliketheDeletemethodthatwillonlydeleteerrorsthatwerecreatedusingtheAddmethodoftheErrorscollection,theDeleteAllmethodwilldeleteallerrorsintheErrorscollection,regardlessofhowtheywerecreated.

Page 1199: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theDeleteAllmethodoftheErrorscollectionisusedtodeletealltheerrorsthatitcontains:

XDocument.Errors.DeleteAll();

Page 1200: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

DisableAutoUpdateMethod

Disablesautomaticsynchronizationbetweenaform'sunderlyingXMLdocumentandtheassociatedViewobject.

expression.DisableAutoUpdate()

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

Page 1201: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1202: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheviewsinaMicrosoftOfficeInfoPath2003formareautomaticallysynchronizedwiththedatathatiscontainedinaform'sunderlyingXMLdocument.YoucanoverridethisbyusingtheDisableAutoUpdatemethod.Youmayneedtodothisforperformancereasons,suchaswhenyouareprogramaticallymakingmanychangestoaform'sunderlyingXMLdocumentandyoudonotwanttheviewtoberefresheduntilthechangesarecomplete.

AutomaticsynchronizationcanbeenabledusingtheEnableAutoUpdatemethodoftheViewobject.

Page 1203: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theDisableAutoUpdatemethodoftheViewobjectisusedtodisablesynchronizationbetweenaform'sunderlyingXMLdocumentandtheviewthatitisassociatedwith:

XDocument.View.DisableAutoUpdate();

Page 1204: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

EnableMethod

DefinesamethodthatmustbeprovidedbythedeveloperforInfoPathtocallwhenitneedstoenableordisableaninstanceofthecontrolinaview.

expression.Enable(vfEnabledAsBoolean)

expressionRequired.AnexpressionthatreturnsareferencetotheInfoPathControlobject.

vfEnabledRequired.ABooleanvaluethatspecifieswhetherthecontrolisenabled.

Page 1205: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksInfoPathwillcalltheEnablemethodtoenableordisablethecontrol,suchaswhentheviewisbeingrefreshedorclosed,whenthedocumentissignedandshouldnotbeedited,orwhenrulesareappliedtotheformthatmustdisablethecontrol.

TheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1206: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

EnableAutoUpdateMethod

Enablesautomaticsynchronizationbetweenaform'sunderlyingXMLdocumentandtheassociatedViewobject.

expression.EnableAutoUpdate()

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

Page 1207: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1208: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheviewsinaMicrosoftOfficeInfoPath2003formareautomaticallysynchronizedwiththedatathatiscontainedinaform'sunderlyingXMLdocument.However,thiscanbeoverriddenusingtheDisableAutoUpdatemethod.Tore-enablesynchronization,usetheEnableAutoUpdatemethod.

Page 1209: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theEnableAutoUpdatemethodoftheViewobjectisusedtoenablesynchronizationbetweenaform'sunderlyingXMLdocumentandtheviewthatitisassociatedwith:

XDocument.View.EnableAutoUpdate();

Page 1210: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

EvalMethod

ReturnsaVariantcontainingthesetofresultscalculatedwhentheexpressionisappliedtoeachsetofelementsinthecontext.

expression.Eval(ByValnodeListAsIXMLDOMNodeList,ByValbstrExpressionasString)AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheMathobject.

nodeListRequiredIXMLDOMNodeList.Thenodethatsetsthecontextfortheexpression.

bstrExpressionRequiredString.Theexpressiontobeappliedtoeachsetofnodesinthespecifiedcontext.

Page 1211: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1212: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1213: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,thevariablemaxCostissettothelargestcostvalue,wherecostiscalculatedbymultiplyingpricebyquantity.

varnodes=XDocument.DOM.selectNodes("/my:items/my:item");varmaxCost=XDocument.Util.Math.Max(XDocument.Util.Math.Eval

Page 1214: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1215: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExecuteActionMethod

ExecutesaMicrosoftOfficeInfoPath2003editingcommandagainstaform'sunderlyingXMLdocument,basedonthedataselectedintheviewthatisassociatedwiththeViewobject.

expression.ExecuteAction(ByValbstrActionAsString,[ByValvarXmlToEditAsVariant])

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

bstrActionRequiredString.Thenameoftheeditingactiontoperform.

varXmlToEditOptionalVariant.Thenameofthefieldorgrouptowhichtoapplytheeditingaction.ThisisequivalenttothevalueofthenameattributeinthexmlToEditelementoftheformdefinition(.xsf)file.

Page 1216: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1217: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheExecuteActionmethodisusedtoprogrammaticallyperformbuilt-inInfoPatheditingactionsagainstaform'sunderlyingXMLdocument,basedontheselectedcontextinaview.

Theactionthatisexecutedwillbethesameactionthatwouldbeusedwhenclickingonanequivalentmenuortoolbarbutton;namelyoneforwhichthebuttonelementinthe.xsffilehascorrespondingxmlToEditandactionattributes.Aswithusingabutton,theactionwillbebasedoncurrentselection:itwillactontheselectedcontext(andinthecasewheretheselectionwouldleadthebuttontobedisabled,thentheExecuteActionmethodwillhavenoeffect).

NoteItispossiblewithscriptingcodetofirstsettheselectioncontextbyusingtheSelectNodesorSelectTextmethodsoftheViewobject,thencallingtheExecuteActionmethodtoactonthatcontext.

TheExecuteActionmethodwillreturnanerrorforthefollowingreasons:

ThebstrActionparameterdoesnotcontainavalideditingcomponentname.

ThevarXmlToEditparameterdoesnotmatchaneditingcomponentthatisdefinedintheview.

ThevarXmlToEditparameterisrequiredforaspecificeditingaction.

Theeditingactionisnotapplicabletotheselectedcontext.

Validparametercombinations

NoteInsomecases,callingtheExecuteActionmethodfromtheOnClickeventforabuttoninaviewmaycauseanerror.Thisisbecausetheselectedcontextchangestothebuttonwhenthebuttonisclicked.Inthiscase,itisbettertouseabutton(orlink)onacustomtaskpane,toolbar,ormenutocalltheExecuteActionmethod.

Page 1218: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theExecuteActionmethodoftheViewobjectisusedtodeleteselecteddataandplaceitontheclipboard:

XDocument.View.ExecuteAction("Cut");

Inthefollowingexample,theExecuteActionmethodoftheViewobjectisusedtoinsertdatausingthexCollectioneditingcomponent,basedontheselectedcontext:

XDocument.View.ExecuteAction("xCollection::insert","group1_1");

Page 1219: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExportMethod

Exportstheviewtoafileofthespecifiedformat.

expression.Export(ByValbstrURLAsString,ByValbstrFormatAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

bstrURLRequiredString.Thedirectorylocationthattheexportedviewfilewillbewrittento.

bstrFormatRequiredString.Thetypeoffileformattoexportto.Onlythe"MHT"valueissupported.

Page 1220: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1221: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfusedinaformthatisnotfullytrusted,theExportmethodwillreturna"permissiondenied"error.

Page 1222: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theExportmethodoftheViewobjectisusedtoexportthecurrentview:

XDocument.View.Export("C:\\MyView","MHT");

Page 1223: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1224: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ForceUpdateMethod

Forcessynchronizationbetweenaform'sunderlyingXMLdocumentandtheassociatedViewobject.

expression.ForceUpdate()

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

Page 1225: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1226: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheviewsinaMicrosoftOfficeInfoPath2003formareautomaticallysynchronizedwiththedatathatiscontainedinaform'sunderlyingXMLdocument.However,youcanforcesynchronizationtooccurusingtheForceUpdatemethod.Thisisalsousefulwhendatainasecondarydatasourcehaschangedandneedstoberefreshedintheview.

AutomaticsynchronizationcanbedisabledusingtheDisableAutoUpdatemethodandenabledusingtheEnableAutoUpdatemethod.

Page 1227: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theForceUpdatemethodoftheViewobjectisusedtoforcesynchronizationbetweenaform'sunderlyingXMLdocumentandtheviewthatitisassociatedwith:

XDocument.View.ForceUpdate();

Page 1228: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1229: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

FormatStringMethod

FormatsthespecifiedstringorXMLnodeaccordingtothespecifiedcategoryandoptionsparameters.

expression.FormatString(ByValvarInput,ByValbstrCategoryAsString,ByValbstrOptionsAsString)AsString

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

varInputRequiredStringorXMLnode.ThestringvalueorXMLnodetobeformatted.

bstrCategoryRequiredString.Thestringvaluethatspecifiesthecategoryusedforformatting.Valuesincludenumber,percentage,currency,date,time,anddatetime.

bstrOptionsRequiredString.Thestringvaluethatspecifiestheoptionsusedforformatting.Takestheformofacase-sensitivestringintheformat"optionName:value".

returnsString.

Page 1230: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1231: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheFormatStringmethodcanbeusedanywhereinyourscriptingcodeinwhichyouneedtochangetheformatofaspecifiedstring.ItmustbequalifiedwiththeApplicationobjectname,anditsreturnvaluemustbeassignedtoavariableorusedasanexpressionthatrequiresastringvalue.

ThefollowingsectionslistthevaluesthatmaybeusedforthebstrCategoryandbstrOptionsparameters:

Listofcategories

Listofoptions

Page 1232: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theFormatStringmethodoftheApplicationobjectisusedtoformatthespecifieddatestringintoalongdateformat:

Application.FormatString("2003-01-08","date","dateFormat:LongDate");

Page 1233: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1234: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

GenerateDataSetDiffGramMethod

ReturnsanXMLDataSet,containinganinlineschemadescribingthedataandtheDataSet'sDiffGram.

expression.GenerateDataSetDiffGram(ByValpNodeAsIXMLDocumentObject)AsIXMLDocumentObject

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

pNodeRequiredIXMLDocumentObject.AnXMLDocumentObjectModel(DOM)nodethatcontainstheXMLdataoftheDataSetwhoseDiffGramwillbecreated.

Page 1235: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1236: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheDiffGramfortheinputpNodeisgeneratedusingthesiblingnodeoriginalDatatocomputethedifferencebetweentheoriginalDataandtheinputpNode.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1237: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1238: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

GetContextNodesMethod

ReturnsareferencetoanXMLNodescollectionthatispopulatedwithXMLDocumentObjectModel(DOM)nodesbasedonthecurrentcontext.ItconsistsofthesequenceofXMLDOMnodesthataremappedfromtheview,correspondingtothecurrentXSLTransformation(XSLT)node,startingatthecurrentselectionandwalkingupthroughtheviewancestorstotheBODYtag.expression.GetContextNodes([ByValvarNodeAsVariant],[ByValvarViewContextAsVariant])AsXMLNodes

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

varNodeOptionalVariant.AnXMLDOMnode.

varViewContextOptionalVariant.TheIDofthecontrolthatisusedforthecontext.

returnsAreferencetotheXMLNodescollection.

Page 1239: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1240: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfnoparametersareused,thecontextnodesarebasedonthecurrentselection.Ifparametersareused,thenthecontextnodesreturnedarethosethatwouldbereturnedbasedontheselectionthatwouldbeobtainedfromcallingtheSelectNodesmethodoftheViewobject.

Page 1241: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingpartialexamplefromtheStructuralEditingdevelopersampleform,theGetContextNodesmethodoftheViewobjectisusedtoreturnacollectionofXMLDOMnodesbasedonthecurrentcontext.ThenthecodeloopsthroughthecollectionofXMLDOMnodeslookingforaparticularnode.Whenitisfound,thecodecallsthecustomApplyDiscountToItemfunctiontoupdatethedatathatthenodecontains.

objContextNodes=XDocument.View.GetContextNodes();

//Scanthelistofcontextnodesforanitemnodeandifoneisfound//applythediscounttoit.for(vari=0;i<objContextNodes.Count;i++){if(objContextNodes.item(i).nodeName=="item"){ApplyDiscountToItem(objContextNodes.item(i),intPercentage);blnAppliedDiscount=true;break;}}

Page 1242: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1243: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

GetDataVariableMethod

Returnsastringcontainingthevalueofthespecifiedvariable,whichisapredefinedvariablestoredasaprocessinginstructionattributeintheform'sunderlyingXMLdocument.

expression.GetDataVariable(ByVallVariableNumberAsLong)AsString

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

lVariableNumberRequiredLong.Thenumberofthevariable.

returnsString.

Page 1244: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1245: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfthevariableisnotdefinedorisempty,theGetDataVariablemethodwillreturnanemptystring.Tosetavariable,usetheSetDataVariablemethodoftheXDocumentobject.

NoteInfoPathonlysupportsusingtheinitialViewvariable,whichisthevariableusedtospecifytheinitialviewdisplayedwhenaformisopened.Thenumberofthisvariableisalways1,anditsvaluemustbethenameofaviewwithintheform.

Page 1246: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theGetDataVariablemethodoftheXDocumentobjectisusedtoreturnthevalueofthefirstvariable:

varstrVariable1;strVariable1=XDocument.GetDataVariable(1);

Page 1247: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1248: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

GetDOMMethod

ReturnsareferencetotheXMLDocumentObjectModel(DOM)ofthespecifiedDataObjectobjectassociatedwiththeXDocumentobject.

expression.GetDOM(ByValbstrNameAsString)AsXMLDOMDocument

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

bstrNameRequiredString.ThenameofaDataObjectobject.

returnsAreferencetoanXMLDOMdocumentobject.

Page 1249: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1250: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfteryouhaveareferencetotheXMLDOMthattheGetDOMmethodreturns,youcanuseanyofthepropertiesandmethodsthattheXMLDOMsupportstomanipulatethedatathattheDOMcontains.

NoteFormoreinformationabouttheXMLDOM,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

Page 1251: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theGetDOMmethodoftheXDocumentobjectisusedtosetareferencetotheXMLDOMthatitreturns,whichinthiscaseistheDataObjectobjectnamedCityDropDownList:

varobjXml;

objXml=XDocument.GetDOM("CityDropDownList");

Page 1252: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

GetNamedNodePropertyMethod

ReturnsthevalueofanamedpropertyforthespecifiedXMLnode,whichmustbeanonattributenodeinthemaindatasource.

expression.GetNamedNodeProperty(ByValvarMainDOMNodeAsVariant,ByValbstrPropertyNameAsString,ByValbstrDefaultValueAsString)AsString

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

varMainDOMNodeRequiredVariant.AnXMLnodecorrespondingtoanonattributenodeinthemaindatasource,forwhichanamedpropertyistobeset.

bstrPropertyNameRequiredString.Specifiesthenameofthepropertywhosevalueistobereturned.

bstrDefaultValueRequiredString.Specifiesthedefaultvaluetobereturnedifthepropertyhasnotbeenset.

returnsAstringcorrespondingtothecurrentvalueofthenamedpropertyforthespecifiedXMLnodeinthemaindatasource.IfthespecifiedpropertyhasnotbeensetforthisXMLnode,thespecifieddefaultstringisreturned.

Page 1253: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1254: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNamedpropertiesallowuserstoassociatestringswithuser-definedpropertiesofXMLelementnodesinthemaindatasource.ThevalueofanamedpropertycanbesetbyusingtheSetNamedNodePropertymethod.UsetheGetNamedNodePropertymethodtoreadthevalueofanamedproperty.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1255: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampledemonstratessettingandgettingthevalueofanamedproperty(withthename"cost")ofanXMLnode(called"item"):

varobjXMLNode=XDocument.DOM.selectSingleNode("/items/item");

varstrTest=XDocument.GetNamedNodeProperty(objXMLNode,'cost','Valuenotset');

//Thevalueofthe"cost"namedpropertyissetto100.XDocument.SetNamedNodeProperty(objXMLNode,'cost','100');

strTest=XDocument.GetNamedNodeProperty(objXMLNode,'cost','Valuenotset');

InthefollowingXSLexample,the"cost"namedpropertyoftheitemnodeisdisplayed:

<xsl:value-ofselect="xdXDocument:GetNamedNodeProperty(item,'cost','empty')"/>

Page 1256: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1257: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

GetSelectedNodesMethod

ReturnsareferencetoanXMLNodescollectionthatispopulatedwithXMLDocumentObjectModel(DOM)nodesbasedonthecurrentselectionofitemsinaview.

expression.GetSelectedNodes()AsXMLNodes

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

returnsAreferencetotheXMLNodescollection.

Page 1258: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1259: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfnoitemsareselectedinaview,orifonlytextisselected,thentheGetSelectedNodesmethodreturnsanemptycollection.

Page 1260: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theGetSelectedNodesmethodoftheViewobjectisusedtosetareferencetoacollectionofXMLDOMnodesbasedonwhatiscurrentlyselectedintheview.Thenthecodedetermineswhethernodeswerereturnedand,iftheywere,displaysinformationaboutthefirstnodefoundintheXMLNodescollectioninamessagebox.

objXMLNodes=XDocument.View.GetSelectedNodes();

if(objXMLNodes.Count>0){XDocument.UI.Alert(objXMLNodes(0).nodeName+"\n\n"+objXMLNodes(0).text);}

Page 1261: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ImportDOMMethod

ImportsthespecifiedXMLdataintothecurrentform.

expression.ImportDOM(ByValpxDocAsIXMLDocumentObject)

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

pxDocRequiredIXMLDocument.TheXMLdatathatistobeimported(merged)intothecurrentlyopenform.

Page 1262: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1263: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsingtheobjectmodeltoimportaformprogrammaticallyisequivalenttoperformingamergeoperationusingtheMergeFormscommandontheFilemenuinInfoPath.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1264: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theImportDOMmethodoftheXDocumentobjectisusedtoimportaformfromtheOnMergeRequesteventhandler:

XDocument::OnMergeRequest(eventObj){XDocument.ImportDOM(eventObj.DOM);eventObj.ReturnStatus=true;}

Page 1265: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1266: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ImportFileMethod

Importsthespecifiedformintothecurrentform.

expression.ImportFile(ByValbstrFileURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

bstrFileURIRequiredString.TheUniformResourceIdentifier(URI)oftheformthatistobeimported(merged)intothecurrentlyopenform.

Page 1267: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1268: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsingtheobjectmodeltoprogrammaticallyimportaformisequivalenttoperformingamergeoperationintheuserinterface.

Page 1269: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theImportFilemethodoftheXDocumentobjectisusedtoimportaform:

XDocument.ImportFile("C:\SomeOtherForm.xml");

Page 1270: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

InitMethod

DefinesamethodthatmustbeprovidedbythedevelopertoperformanyinitializationroutinesrequiredwhenaninstanceofthecontrolisaddedtoanInfoPathform.

expression.Init(pControlSiteAsInfoPathControlSite)

expressionRequired.AnexpressionthatreturnsareferencetotheInfoPathControlobject.

pControlSiteRequired.AninstanceoftheInfoPathControlSiteobject.

Page 1271: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksInfoPathcallstheInitmethodwhenauseraddsaninstanceofthecontroltoaview.InfoPathpassesaninstanceoftheInfoPathControlSiteobjecttotheInitmethodwhenthecontrolisinitialized.TheInfoPathControlSiteobjectprovidestheNodepropertythatprovidesaccesstotheXMLDOMnodetowhichthecontrolisbound,andtheXDocumentpropertyforaccessingtheXDocumentobjectassociatedwithaform,whichinturnprovidesaccesstothefullInfoPathobjectmodel.

TheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1272: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1273: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsCurrentUserMethod

ReturnsTrueifthecurrentusermatchesthespecifiedusername.

expression.IsCurrentUser(ByValbstrUsernameAsString)AsBoolean

expressionRequired.AnexpressionthatreturnsareferencetotheUserobject.

bstrUsernameRequiredString.Theusernameintheformatof"domain\username."

returnsABooleanvalueindicatingwhetherthespecifiedusernamematchesthenameofthecurrentuser.

Page 1274: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1275: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksEventhoughtheIsCurrentUsermethodismarkedassecuritylevel0,itisnotalwaysaccessible.WhenacallismadetotheIsCurrentUsermethod,InfoPathfirstperformsasecuritychecktodetermineifaccesstothismethodisallowed.Thesecuritycheckconfirmswhetherthecallingcodeistrustedornotanditdeterminesthelocationofthecallingcode.

Ifthecallingcodeistrusted(asitiswhen,forexample,theIsCurrentUsermethodiscalledfromaninstalledorsignedInfoPathformtemplate,orfromtrustedexternalcode,suchasanexecutablefileonthelocalcomputer),InfoPathwillallowfullaccesstotheIsCurrentUsermethod.

Ifthecallingcodeisnottrusted(asinthecircumstanceofacallcomingfromadomain-basedInfoPathformtemplateorfromscriptexecutinginMicrosoftInternetExplorer),InfoPathfirstcheckswherethecallisbeingmadefrom.IfthecallisfromcodethatisnottrustedinanInfoPathformtemplateataURLsuchas"http://www.contoso.com/example.xsn",thenthecallisfromtheInternetzone.InfoPathdeniesaccesstotheIsCurrentUsermethodforallcallsthatarenottrustedcomingfromtheInternetzone.IfthecallisfromaURLsuchas"http://contoso/example.xsn",thenthecallisfromtheIntranetzone.ForacallthatisnottrustedfromtheIntranetzone,InfoPathcheckswhethertheInternetExploreruserauthenticationsettingsallowautomaticlogon(intheIntranetzoneonlyorforeverylogon).IfInternetExplorerisconfiguredforautomaticlogon,thenInfoPathallowsfullaccesstotheIsCurrentUsermethod.Otherwise,accesstotheIsCurrentUsermethodisdenied.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1276: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theIsCurrentUsermethodoftheUserobjectisusedtodetermineifthecurrentuserequals"UserDomain\NancyDavilio".

varfUserMatched;fUserMatched=Application.User.IsCurrentUser("UserDomain\NancyDavolio")

Page 1277: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1278: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsDestinationReachableMethod

ReturnsaBooleanvalueindicatingwhetherthespecifiedUniformResourceLocator(URL),universalnamingconvention(UNC)path,orIPaddressofthedestinationcomputercanbeconnectedtofromtheclientcomputer.

expression.IsDestinationReachable(ByValbstrDestinationAsString,[ByValbstrBehaviorAsString)AsBoolean

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

bstrDestinationRequiredString.Specifiesthelocationtocheckfornetworkconnectivity.IPaddresses,aUNCpaths,oraURLsareacceptablevalues.

returnsABooleanvalueindicatingwhetherthedestinationisreachable.Trueifthespecifieddestinationcanbeconnectedto;otherwise,False.

Page 1279: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

NoteIfanIPaddressisspecified,thesecuritylevelforthismethodbecomeslevel3.ItisnotpossibletodeterminethedomainfromtheIPaddress,thereforethecallermusthavethefulltrustpermission.

Page 1280: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksForUNCandURLstrings,validvaluesarethoseincludingonlytheservername,forexamplehttp://MyServeror\\MyServer.Valuessuchashttp://MyServer/MyVirtualDirectoryor\\MyServer\MySharearenotconsideredvalid.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1281: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1282: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

IsUserMemberOfMethod

ReturnsaBooleanvaluethatindicateswhetherthecurrentuserisamemberofthespecifiedgroup.

expression.IsUserMemberOf(ByValbstrGroupnameAsString)AsBoolean

expressionRequired.AnexpressionthatreturnsareferencetotheUserobject.

bstrGroupnameRequiredString.Thegroupnameintheformatof"domain\groupname."

Page 1283: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1284: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksEventhoughtheIsUserMemberOfmethodismarkedassecuritylevel0,itisnotalwaysaccessible.WhenacallismadetotheIsUserMemberOfmethod,InfoPathfirstperformsasecuritychecktodetermineifaccesstothismethodisallowed.Thesecuritycheckconfirmswhetherthecallingcodeistrustedornotanditdeterminesthelocationofthecallingcode.

Ifthecallingcodeistrusted(asitiswhen,forexample,theIsUserMemberOfmethodiscalledfromaninstalledorsignedInfoPathformtemplate,orfromtrustedexternalcode,suchasanexecutablefileonthelocalcomputer),InfoPathwillallowfullaccesstotheIsUserMemberOfmethod.

Ifthecallingcodeisnottrusted(asinthecircumstanceofacallcomingfromadomain-basedInfoPathformtemplateorfromscriptexecutinginMicrosoftInternetExplorer),InfoPathfirstcheckswherethecallisbeingmadefrom.IfthecallisfromcodethatisnottrustedinanInfoPathformtemplateataURLsuchas"http://www.contoso.com/example.xsn",thenthecallisfromtheInternetzone.InfoPathwilldenyaccesstotheIsUserMemberOfmethodforallcallsthatarenottrustedcomingfromtheInternetzone.IfthecallisfromaURLsuchas"http://contoso/example.xsn",thenthecallisfromtheIntranetzone.ForacallthatisnottrustedfromtheIntranetzone,InfoPathcheckswhethertheInternetExploreruserauthenticationsettingsallowautomaticlogon(intheIntranetzoneonlyorforeverylogon).IfInternetExplorerisconfiguredforautomaticlogon,thenInfoPathcheckstheuser'sgroupmembership.Ifthegroupmembershipispublic,InfoPathallowsfullaccesstotheIsUserMemberOfmethod.Ifthegroupmembershipisnotfullypublic,InfoPathhidestheresult.Thatis,InfoPathtreatsthegroupmembershipasifitwerenotvisible.ThereturnvalueinthiscaseisalwaysFalsebecausethegroupmembershipisnotpublic.InfoPathdoesnotreportthataccessisdenied.

NoteGroupmembershipinformationisfullypublicifaccesstoitisallowedandtheinformationisvisiblebyallnon-anonymoususers.Ifevenasinglenon-anonymoususerhasbeenspecificallydeniedaccesstomembershipinformation,thenthegroupmembershipinformationisnot

Page 1285: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

fullypublic.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1286: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theIsUserMemberOfmethodoftheUserobjectisusedtodetermineifthecurrentuserisamemberofthe"GroupDomain\Administrators"group.

varfGroupMatched;fGroupMatched=Application.User.IsUserMemberOf("GroupDomain\Administrators")

Page 1287: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

MatchMethod

ReturnsaBooleanvaluethatindicateswhetherthetestmatchesthespecifiedpattern.

expression.Match(ByValbstrValueAsString,ByValbstrPatternAsString)AsBoolean

bstrValueRequiredString.Thestringtotestagainstthepattern.

bstrPatternRequiredString.Thepatterntouse.

returnsABooleanvaluethatindicateswhetherthestringmatchesthepattern.

Page 1288: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1289: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheMatchmethodcanbeusedtotestanystringagainstaregularexpression.TheregularexpressionmustconformtotheW3C'sXMLSchemaspecificationforregularexpressions(http://www.w3.org/TR/xmlschema-2/#regexs).

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

NoteTheXMLSchemaspecificationforregularexpressionsisdifferentfromregularexpressionsinPerl.

Page 1290: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,thevariableisSSNValidissettoavaluethatindicateswhetherornotthevaluestoredinthemy:SSNnodeisalegalSocialSecurityNumber:

varSSN=XDocument.DOM.selectSingleNode(“//my:SSN”);varisSSNValid=XDocument.Util.Match(SSN.text,"\\d\\d\\d-\\d\\d-\\d\\d\\d\\d");

Page 1291: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

MaxMethod

ReturnsaVariantthatisthelargestvalueofallofthenumericalelementsinanodeset.

expression.Max(ByValpxmllistInputAsIXMLDOMNodeList)AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheMathobject.

pxmllistInputRequiredIXMLDOMNodeList.Thenodesettosearchforthelargestvalue.

returnsAVariantthatrepresentsthelargestvalueofallthenumericalelementsinanodeset.

Page 1292: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1293: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1294: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,maxAgeissettothemaximumvalueofallofthenumericalelementsinthemy:agesnodeset:

varages=XDocument.DOM.selectNodes("//my:ages");varmaxAge=XDocument.Util.Math.Max(ages);

Page 1295: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

MinMethod

ReturnsaVariantthatisthesmallestvalueofallofthenumericalelementsinanodeset.

expression.Min(ByValpxmllistInputAsIXMLDOMNodeList)AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheMathobject.

pxmllistInputRequiredIXMLDOMNodeList.Thenodesettosearchforthesmallestvalue.

returnsAVariantthatrepresentsthesmallestvalueofallthenumericalelementsinanodeset.

Page 1296: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1297: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1298: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,thevariableminAgeissettotheminimumvalueofallofthenumericalelementsinthemy:agesnodeset:

varages=XDocument.DOM.selectNodes("//my:ages");varmaxAge=XDocument.Util.Math.Min(ages);

Page 1299: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1300: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NavigateMethod

LoadsthespecifiedHTMLdocumentintotheMicrosoftOfficeInfoPath2003customtaskpane.

expression.Navigate(ByValbstrURLAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLTaskPaneobject.

bstrURLRequiredString.TheUniformResourceLocator(URL)oftheHTMLdocumenttonavigateto.

Page 1301: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1302: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheNavigatemethodoftheHTMLTaskPaneobjectisoneofthemethodsinheritedbytheTaskPaneobjectwhenthetypeofthetaskpaneis0,whichmeansthatitisthecustomtaskpane.

NoteTheNavigatemethodcannotbecalledduringanOnLoadeventbecausetheviewisnotyetloadedwhenthiseventoccurs,andtaskpanesareassociatedwiththeview.

Page 1303: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theNavigatemethodoftheHTMLTaskPaneobjectisusedtoloadanHTMLdocumentintothecustomtaskpane.TheHTMLdocumentthatitloadsisonethatisincludedintheformfilesoftheformtemplate:

varobjTaskPane;

//Setareferencetothecustomtaskpane.objTaskPane=XDocument.View.Window.TaskPanes(0);objTaskPane.Navigate("taskpane2.htm");

Page 1304: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1305: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NewMethod(ExternalApplicationObject)

CreatesanewMicrosoftOfficeInfoPath2003formbasedonaspecifiedform.

expression.New(ByValbstrDocumentURIAsString,[ByValdwBehaviorAsLong=1])

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrDocumentURIRequiredString.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)ofaform.

dwBehaviorOptionalLong.Defaultvalueis1.Alongvaluethatspecifieshowtheformshouldbeopened.ThevaluesarebasedontheXdDocumentVersionModeenumeration.

Page 1306: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1307: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheNewmethodcanbeusedtoonlycreateanewformbasedonanexistingform;itcannotbeusedtocreateanewformbasedonaformtemplate.Tocreateaformfromaformtemplate,usetheNewFromSolutionmethodoftheExternalApplicationobject.

WhenyouusetheNewmethod,InfoPathisopenedandthenewformisreadytobefilledout.

NoteYoucannotusetheClosemethodoftheExternalApplicationobjecttocloseafromthathasbeenopenedwiththeNewmethod.WhentheNewmethodcreatesaform,thenameofthatformisnotyetknown.

Page 1308: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theNewmethodoftheExternalApplicationobjectisusedtocreateanewformbasedonaspecifiedform:

PublicSubCreateFromForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'CreateanInfoPathform.objIP.New("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeencreated.")

SetobjIP=Nothing

EndSub

Page 1309: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NewMethod(Index)

TheNewmethodcreatesanewitembasedonaform.ThismethodisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelcollectionsandobjects.ClickaNewmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheNewmethod.

NewmethodasitappliestotheExternalApplicationobject.

NewmethodasitappliestotheXDocumentscollection.

Page 1310: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1311: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NewMethod(XDocumentsCollection)

CreatesanewMicrosoftOfficeInfoPath2003formbasedonthespecifiedform.

expression.New(ByValvarURIAsVariant,[ByValdwBehaviorAsLong=1])AsXDocument

expressionRequired.AnexpressionthatreturnsareferencetotheXDocumentscollection.

varURIRequiredVariant.SpecifiestheUniformResourceIdentifier(URI)ofaform.

dwBehaviorOptionalLong.Defaultvalueis1.Alongvaluethatspecifieshowtheformshouldbeopened.ThevaluesarebasedontheXdDocumentVersionModeenumeration.

returnsAreferencetoanXDocumentobject.

Page 1312: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1313: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheNewmethodcanonlybeusedtocreateanewformbasedonanexistingform;itcannotbeusedtocreateanewformbasedonaformtemplate.Tocreateaformfromaformtemplate,usetheNewFromSolutionmethodoftheXDocumentscollection.

WhenyouusetheNewmethod,thenewformopensinInfoPathandisreadytobefilledout.

NoteIfyouusetheoptionaldwBehaviorargumentintheNewmethod,youcanonlypassthenumericalvalueoftheXdDocumentVersionModeenumeration.BecauseInfoPathusesscriptinglanguagesforworkingwiththeobjectmodel,namedvaluescannotbeused.

Page 1314: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theNewmethodoftheXDocumentscollectionispassedtheURIofanexistingform,andanewformiscreatedanditsassociatedXDocumentobjectreturned:

varobjXDoc;

objXDoc=Application.XDocuments.New("C:\\MyForm.xml");

Page 1315: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1316: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NewADODBConnectionMethod

CreatesandreturnsareferencetoanemptyActiveXDataObjects(ADO)Connectionobject.

expression.NewADODBConnection()ADODB.Connection

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

returnsAreferencetoanADOConnectionobject.

Page 1317: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1318: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheformisnotfullytrusted,theNewADODBConnectionmethodwillreturna"permissiondenied"error.

Page 1319: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theNewADODBConnectionmethodoftheApplicationobjectisusedtosetareferencetoanemptyADOConnectionobject:

varobjADOConnection;

objADOConnection=Application.NewADODBConnection();

Page 1320: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1321: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NewADODBRecordsetMethod

CreatesandreturnsareferencetoanemptyActiveXDataObjects(ADO)Recordsetobject.

expression.NewADODBRecordset()ADODB.Recordset

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

returnsAreferencetoanADORecordsetobject.

Page 1322: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1323: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheformisnotfullytrusted,theNewADODBRecordsetmethodwillreturna"permissiondenied"error.

Page 1324: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theNewADODBRecordsetmethodoftheApplicationobjectisusedtosetareferencetoanemptyADORecordsetobject:

varobjADORecordset;

objADORecordset=Application.NewADODBRecordset();

Page 1325: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1326: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NewFromSolutionMethod(ExternalApplicationObject)

CreatesanewMicrosoftOfficeInfoPath2003formbasedonthespecifiedformtemplate.

expression.NewFromSolution(ByValbstrSolutionURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrSolutionURIRequiredString.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)ofaformtemplate.

Page 1327: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1328: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheNewFromSolutionmethodcanbeusedonlytocreateanewformbasedonanexistingformtemplate;itcannotbeusedtocreateanewformbasedonanexistingform.Tocreateaformfromanexistingform,usetheNewmethodoftheExternalApplicationobject.

WhenyouusetheNewFromSolutionmethod,InfoPathisopenedandthenewformisreadytobefilledout.

NoteYoucannotusetheClosemethodoftheExternalApplicationobjecttocloseafromthathasbeenopenedwiththeNewFromSolutionmethod.WhentheNewFromSolutionmethodcreatesaform,thenameofthatformisnotyetknown.

Page 1329: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theNewFromSolutionmethodoftheExternalApplicationobjectisusedtocreateanewformbasedonaspecifiedformtemplate:

PublicSubCreateFromFormTemplate()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'CreateanInfoPathformfromaformtemplate.objIP.NewFromSolution("C:\MyForms\MyFormTemplate.xsn")MsgBox("TheInfoPathformhasbeencreated.")

SetobjIP=Nothing

EndSub

Page 1330: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1331: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NewFromSolutionMethod(Index)

TheNewFromSolutionmethodcreatesanewitembasedonaformtemplate.ThismethodisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelcollectionsandobjects.ClickaNewFromSolutionmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheNewFromSolutionmethod.

NewFromSolutionmethodasitappliestotheExternalApplicationobject.

NewFromSolutionmethodasitappliestotheXDocumentscollection.

Page 1332: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1333: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NewFromSolutionMethod(XDocumentsCollection)

CreatesanewMicrosoftOfficeInfoPath2003formbasedonthespecifiedformtemplate.

expression.NewFromSolution(ByValvarURIAsVariant)AsXDocument

expressionRequired.AnexpressionthatreturnsareferencetotheXDocumentscollection.

varURIRequiredVariant.SpecifiestheUniformResourceIdentifier(URI)ofaform.

returnsAreferencetoanXDocumentobject.

Page 1334: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1335: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheNewFromSolutionmethodcanonlybeusedtocreateanewformbasedonanexistingformtemplate;itcannotbeusedtocreateanewformbasedonaform.Tocreateaformfromanexistingform,usetheNewmethodoftheXDocumentscollection.

WhenyouusetheNewFromSolutionmethod,thenewformopensinInfoPathandisreadytobefilledout.

Page 1336: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theNewFromSolutionmethodoftheXDocumentscollectionispassedtheURIofanexistingformtemplate,andanewformiscreatedanditsassociatedXDocumentobjectreturned:

varobjXDoc;

objXDoc=Application.XDocuments.NewFromSolution("C:\\MyForm.xsn");

Page 1337: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1338: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NewFromSolutionWithDataMethod

CreatesanewMicrosoftOfficeInfoPath2003formusingthespecifiedXMLdataandformtemplate.

expression.NewFromSolutionWithData(ByValvarXMLDataAsVariant,ByValvarSolutionURIAsVariant,[ByValdwBehaviorAsLong=1])AsXDocument

expressionAnexpressionthatreturnsareferencetoanXDocumentscollection.

varXMLDataRequiredVariant.ProvidestheXMLdatatobeusedasatemplatefortheform.CanbeastringthatspecifiestheUniformResourceIdentifier(URI)ofanXMLdocument,oranXMLDOMNodethatcontainstheXMLtobeusedastheXMLdocument(template).

varSolutionURIRequiredVariant.StringwhichspecifiestheUniformResourceIdentifier(URI)ofaformtemplatefile(an.xsfor.xsnfile).

dwBehaviorOptionalLong.Reservedforfutureuse.Thisvalueshouldbeomittedorsetto1.

returnsAreferencetoanXDocumentobject.

Page 1339: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1340: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefollowingrelatedmethodsoftheXDocumentscollectionarealsoavailable:

TheNewmethodenablescreatinganewinstanceofInfoPathbyusingaspecifiedXMLdocument.TheXMLdocumentmustcorrespondtoanInfoPathform.AnewformisopenedinInfoPath,usingthesuppliedXMLdocumentasinitialdata,anditsassociatedformtemplateasspecifiedintheprocessinginstructionsintheheaderofthedocument.

TheNewFromSolutionmethodenablescreatinganewinstanceofInfoPathusingaspecifiedformtemplate,anditsassociatedXMLform(theinitialtemplatedata).

TheNewFromSolutionWithDatamethodsupportsascenariothatisnotprovidedbytheforegoingtwomethods:specifyingboththeXMLdocumentusedasinitialdataandtheformtemplate.TheXMLdocumentdoesnotneedtohavebeencreatedbyInfoPath.ItcanbesuppliedeitherasaURIorasanXMLDOMNode.

WhenyouusetheNewFromSolutionWithDatamethod,thenewformopensinInfoPathandisreadytobefilledout.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1341: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theNewFromSolutionWithDatamethodoftheXDocumentscollectionispassedtheURIsofanexistingXMLdocument,andanexistingformtemplate,andanewformiscreatedanditsassociatedXDocumentobjectisreturned:

varobjXDoc=Application.XDocuments.NewFromSolutionWithData

Inthefollowingexample,theNewFromSolutionWithDatamethodoftheXDocumentscollectionispassedanXMLDOMNodeasinitialdataandtheURIofanexistingform,andanewformiscreatedanditsassociatedXDocumentobjectisreturned:

varobjXMLNode=XDocument.DOM.selectSingleNode("/employees/employee");

varobjXDoc=Application.XDocuments.NewFromSolutionWithData

Page 1342: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NowMethod

ReturnsaVariantthatrepresentsthecurrentsystemdateandtimeinISOformat(yyyy-mm-ddThh:mm:ss).

expression.Now()AsVariant

expressionRequired.AnexpressionthatreturnsareferencetoaDateobject.

returnsAVariantthatrepresentsthecurrentsystemdateandtime.

Page 1343: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1344: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1345: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,thevariablecurrentDateTimeissettothecurrentsystemdateandtime:

varcurrentDateTime=XDocument.Util.Date.Now();

Page 1346: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NzMethod

ReturnsaVariantthatisidenticaltothenodesetpassedtothefunction,exceptemptyvaluesinthenodelistarereplacedwithzeros(0).

expression.Nz(ByValpxmllistInputAsIXMLDOMNodeList)AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheMathobject.

pxmllistInputRequired.Thenodesetthatwillhaveitsemptyvaluesreplacedwithzeroes.

returnsAVariantthatrepresentsanodeset.

Page 1347: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1348: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1349: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,thevariablenoZeroissettoanodesetthatisidenticaltothemy:agesnodeset,withallblankvaluesreplacedbyzeros:

varages=XDocument.DOM.selectNodes("//my:ages");varnoZero=XDocument.Util.Math.Nz(ages);

Page 1350: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1351: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OpenMethod(ExternalApplicationObject)

OpensthespecifiedMicrosoftOfficeInfoPath2003form.

expression.Open(ByValbstrDocumentURIAsString,[ByValdwBehaviorAsLong=1])

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrDocumentURIRequiredString.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)ofaform.

dwBehaviorOptionalLong.Defaultvalueis1.Alongvaluethatspecifieshowtheformshouldbeopened.ThevaluesarebasedontheXdDocumentVersionModeenumeration.

Page 1352: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1353: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheOpenmethodcanbeusedonlytoopenaform;itcannotbeusedtoopenaformtemplate.Tocreateaformfromaformtemplate,usetheNewFromSolutionmethodoftheExternalApplicationobject.Tocreateaformbasedonanexistingform,usetheNewmethodoftheExternalApplicationobject.

Page 1354: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theOpenmethodoftheExternalApplicationobjectisusedtoopenaspecifiedform:

PublicSubAutomateInfoPathForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'OpenanInfoPathform.objIP.Open("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeenopened.")

'ClosetheInfoPathform.objIP.Close("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeenclosed.")

'QuittheInfoPathapplication.objIP.QuitMsgBox("TheInfoPathapplicationhasbeenclosed.")

SetobjIP=Nothing

EndSub

Page 1355: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OpenMethod(Index)

TheOpenmethodopensaform.ThismethodisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelcollectionsandobjects.ClickanOpenmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheOpenmethod.

OpenmethodasitappliestotheExternalApplicationobject.

OpenmethodasitappliestotheXDocumentscollection.

Page 1356: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1357: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OpenMethod(XDocumentsCollection)

OpensthespecifiedMicrosoftOfficeInfoPath2003form.

expression.Open(ByValvarURIAsVariant,[ByValdwBehaviorAsLong=1])AsXDocument

expressionRequired.AnexpressionthatreturnsareferencetotheXDocumentscollection.

varURIRequiredVariant.SpecifiestheUniformResourceIdentifier(URI)ofaform.

dwBehaviorOptionalLong.Defaultvalueis1.Alongvaluethatspecifieshowtheformshouldbeopened.ThevaluesarebasedontheXdDocumentVersionModeenumeration.

returnsAreferencetoanXDocumentobject.

Page 1358: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1359: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheOpenmethodcanonlybeusedtoopenaform;itcannotbeusedtoopenaformtemplate.Tocreateaformfromaformtemplate,usetheNewFromSolutionmethodoftheXDocumentscollection.Tocreateaformbasedonanexistingform,usetheNewmethodoftheXDocumentscollection.

WhenyouusetheOpenmethod,thespecifiedformopensinInfoPathandisreadytobefilledout.

NoteIfyouusetheoptionaldwBehaviorargumentintheOpenmethod,youcanonlypassthenumericalvalueoftheXdDocumentVersionModeenumeration.BecauseInfoPathusesscriptinglanguagesforworkingwiththeobjectmodel,namedvaluescannotbeused.

Page 1360: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theOpenmethodoftheXDocumentscollectionispassedtheURIofanexistingform,andtheformisopenedanditsassociatedXDocumentobjectreturned:

varobjXDoc;

objXDoc=Application.XDocuments.Open("C:\\MyForm.xml");

Page 1361: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

PerformSaveOperationMethod

Performsthesaveoperationrequestedbytheuser.

expression.PerformSaveOperation()

expressionRequired.AnexpressionthatreturnsareferencetoaSaveEventobject.

Page 1362: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1363: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThePerformSaveOperationmethodperformsa"save"or"saveas"operationdependingonthevalueoftheIsSaveAspropertyoftheSaveEventobject.Iftheoperationissuccessful,theIsDirtypropertyoftheXDocumentobjectissettoFalseandthePerformSaveOperationmethodreturnsTrue.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1364: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,thePerformSaveOperationmethodoftheSaveEventobjectisusedtosavetheformusingtheinternaldefinitionofsave.

eventObj.PerformSaveOperation();

Page 1365: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

PrintOutMethod

Printstheformcontentasitisrenderedinthewindowcorrespondingtotheform'sactiveview.

expression.PrintOut()

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 1366: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1367: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThePrintOutmethodusesthecurrentprintersettings.Returnsapermissiondeniederrorifcalledfromaformthatisnotfullytrusted.

Itisrecommendedthatyoudon'tcallthePrintOutmethodfromanOnLoadorOnSwitchVieweventprocedure.YoumayencounteroneormoreofthefollowingbehaviorswhencallingthePrintOutmethodfromanOnLoadorOnSwitchVieweventprocedure:

Theviewmayprintcorrectly.

Ablankdocumentmaybeprinted.

Theincorrectviewmaybeprinted.

Thefollowingexceptionmayoccur:

InvalidcontextfortheOMcall.

Page 1368: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,thePrintOutmethodoftheXDocumentobjectisusedtoprintthecurrentview:

XDocument.PrintOut();

Page 1369: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryMethod(ADOAdapterObject)

Readsdatafromtheassociateddataadapter.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetoanADOAdapterobject.

Page 1370: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1371: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheQuerymethodfailsiftheQueryAllowedpropertyoftheADOAdapterobjectisFalse.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1372: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1373: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryMethod(DataObjectObject)

ReadsdatafromthedataadapterthatisassociatedwiththeDataObjectobjectandrepopulatestheDataObjectobject'sassociatedXMLDocumentObjectModel(DOM).

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetotheDataObjectobject.

Page 1374: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1375: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheQuerymethodcanbeusedtorefreshthedatacontainedintheXMLDOMthatisassociatedwithaDataObjectobject.

Page 1376: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theQuerymethodoftheDataObjectobjectisusedtorefreshthedatacontainedintheXMLDOMassociatedwiththeDataObjectobject:

XDocument.DataObjects("CityList").Query();

AfteryouhaverefreshedthedataintheDataObjectobject,youcancalltheForceUpdatemethodoftheViewobjecttosynchronizethedatacontainedintheDataObjectobjectandtheview:

XDocument.View.ForceUpdate();

Page 1377: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryMethod(DAVAdapterObject)

TheQuerymethodisavailablefortheDAVAdapterobjectbut,becausetheDAVAdapterobjectisavailableforsubmittingdataonly,themethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetotheDAVAdapterobject.

Page 1378: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1379: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1380: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryMethod(EmailAdapterObject)

TheQuerymethodisavailablefortheEmailAdapterobjectbut,becausetheEmailAdapterobjectisavailableforsubmittingdataonly,themethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetotheEmailAdapterobject.

Page 1381: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1382: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1383: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryMethod(HWSAdapterObject)

TheQuerymethodisavailablefortheHWSAdapterobjectbut,becausetheHWSAdapterobjectisavailableforsubmittingdataonly,themethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetotheHWSAdapterobject.

Page 1384: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1385: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1386: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1387: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryMethod(Index)

TheQuerymethodretrievesdatafromtheassociateddataadapterandstoresitinanXMLDocumentObjectModel(DOM).ThismethodisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaQuerymethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheQuerymethod.

QuerymethodasitappliestotheADOAdapterobject.

QuerymethodasitappliestotheDataObjectobject.

QuerymethodasitappliestotheDAVAdapterobject.

QuerymethodasitappliestotheHWSAdapterobject.

QuerymethodasitappliestotheEmailAdapterobject.

QuerymethodasitappliestotheSharepointListAdapterobject.

QuerymethodasitappliestotheWebServiceAdapterobject.

QuerymethodasitappliestotheXDocumentobject.

QuerymethodasitappliestotheXMLFileAdapterobject.

Page 1388: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryMethod(SharePointListAdapterObject)

Readsdatafromtheassociateddataadapter.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetoaSharepointListAdapterobject.

Page 1389: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1390: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheQuerymethodfailsiftheQueryAllowedpropertyoftheSharePointListAdapterobjectisFalse.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1391: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1392: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryMethod(WebServiceAdapterObject)

Readsdatafromtheassociateddataadapter.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

Page 1393: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1394: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheQuerymethodfailsiftheQueryAllowedpropertyoftheWebServiceAdapterobjectisFalse.

NoteAnADO.NetDataSetcannotbeusedasaqueryparameterfortheWebServiceAdapterobjectoranyotherdataadapter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1395: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1396: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryMethod(XDocumentObject)

Retrievesdatafromaform'sassociateddataadapterobjectandstoresthedataintheform'sunderlyingXMLDocumentObjectModel(DOM).

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 1397: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1398: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheQuerymethodwillreturnanerroriftheformdoesnothaveanassociateddataadapterobject.

Page 1399: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theQuerymethodoftheXDocumentobjectisusedtoquerytheassociateddataadapter:

XDocument.Query();

Page 1400: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QueryMethod(XMLFileAdapterObject)

Readsdatafromtheassociateddataadapter.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetoanXMLFileAdapterobject.

Page 1401: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1402: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheQuerymethodfailsiftheQueryAllowedpropertyoftheXMLFileAdapterobjectisFalse.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1403: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QuitMethod(ApplicationObject)

QuitstheMicrosoftOfficeInfoPath2003application.

expression.Quit([ByValbForceAsBoolean=False])

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

bForceOptionalBoolean.DefaultvalueisFalse.Determineswhetheropenformswillbesavedduringthequitoperation.IfsettoFalse,allformswillbeclosedwithoutsaving,evenifthedataintheformshasbeenchanged.IfsettoTrue,theuserwillbepromptedtosavetheforms.

Page 1404: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1405: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheQuitmethodisusedinaformthatisnotfullytrusted,themethodwillreturna"permissiondenied"error.

Page 1406: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theQuitmethodoftheApplicationobjectisusedtoquitInfoPathwithoutsavinganyofthecurrentlyopenforms:

Application.Quit(false);

Page 1407: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1408: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QuitMethod(ExternalApplicationObject)

QuitstheMicrosoftOfficeInfoPath2003application.

expression.Quit

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

Page 1409: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1410: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfyouusetheClosemethodoftheExternalApplicationobjectbeforeusingtheQuitmethod,datathathasbeenchangedintheformwillnotbesaved,norwillusersbepromptedtosaveit.However,ifyoudonotusetheClosemethodbutonlyusetheQuitmethod,userswillbepromptedtosavetheformbeforequittingtheInfoPathapplication.

Page 1411: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theQuitmethodoftheExternalApplicationobjectisusedtoquittheInfoPathapplication:

PublicSubAutomateInfoPathForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'OpenanInfoPathform.objIP.Open("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeenopened.")

'ClosetheInfoPathform.objIP.Close("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeenclosed.")

'QuittheInfoPathapplication.objIP.QuitMsgBox("TheInfoPathapplicationhasbeenclosed.")

SetobjIP=Nothing

EndSub

Page 1412: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

QuitMethod(Index)

TheQuitmethodquitstheapplication.ThismethodisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaQuitmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheQuitmethod.

QuitmethodasitappliestotheApplicationobject.

QuitmethodasitappliestotheExternalApplicationobject.

Page 1413: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1414: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RegisterSolutionMethod(ApplicationObject)

InstallsthespecifiedMicrosoftOfficeInfoPathformtemplate.

expression.RegisterSolution(ByValbstrSolutionURLAsString,[ByValbstrBehaviorAsString="overwrite"])

expressionRequired.AnexpressionthatreturnsareferencetoanApplicationobject.

bstrSolutionURLRequiredString.ThestringthatspecifiestheUniformResourceLocator(URL)oftheformtemplate.Thisparametercanbespecifiedasaformdefinition(.xsf)fileoraformtemplate(.xsn)file.

bstrBehaviorOptionalString.Defaultvalueis"overwrite".Thestringthatspecifieshowtheformtemplateistobeinstalled.Theonlyothervalidvalueforthisparameteris"new-only".

Page 1415: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1416: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheformtemplatehasalreadybeenregistered,and"new-only"isspecifiedforthebstrBehaviorparameter,theRegisterSolutionmethodwillreturnanerror.If"overwrite"isspecified,theformtemplate'sregistrationrecordwillbeoverwritten.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1417: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingVisualBasicforApplications(VBA)example,theRegisterSolutionmethodoftheApplicationobjectisusedtoinstallaformtemplate:

PublicSubInstallForm()

DimobjIPAsObject

'CreateareferencetotheApplicationobject.SetobjIP=CreateObject("InfoPath.Application")

'RegistertheInfoPathformtemplate.objIP.RegisterSolution("C:\\MyForms\\MyFormTemplate.xsn")MsgBox"TheInfoPathformtemplatehasbeenregistered."

SetobjIP=Nothing

EndSub

Page 1418: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1419: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RegisterSolutionMethod(ExternalApplicationObject)

InstallsthespecifiedMicrosoftOfficeInfoPath2003formtemplate.

expression.RegisterSolution(ByValbstrSolutionURLAsString,[ByValbstrBehaviorAsString="overwrite"])

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrSolutionURLRequiredString.ThestringvaluethatspecifiestheUniformResourceLocator(URL)oftheformtemplate.Thisparametercanbespecifiedasaformdefinition(.xsf)fileoraformtemplate(.xsn)file.

bstrBehaviorOptionalString.Defaultvalueisoverwrite.Thestringvaluethatspecifieshowtheformtemplateistobeinstalled.Theonlyothervalidvalueforthisparameterisnew-only.

Page 1420: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1421: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheformtemplatehasalreadybeenregistered,andthenew-onlyvalueisusedforthebstrBehaviorparameter,theRegisterSolutionmethodwillreturnanerror.Iftheoverwritevalueisused,theformtemplate'sregistrationrecordwillbeoverwritten.

Page 1422: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theRegisterSolutionmethodoftheExternalApplicationobjectisusedtoinstallaformtemplate:

PublicSubInstallForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'RegistertheInfoPathformtemplate.objIP.RegisterSolution("C:\\MyForms\MyFormTemplate.xsn")MsgBox("TheInfoPathformtemplatehasbeenregistered.")

SetobjIP=Nothing

EndSub

Page 1423: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1424: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RegisterSolutionMethod(Index)

TheRegisterSolutionmethodinstallsthespecifiedMicrosoftOfficeInfoPath2003formtemplate.ThismethodisimplementedinseveralInfoPathobjectmodelcollections.ClickaRegisterSolutionmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheRegisterSolutionmethod.

RegisterSolutionmethodasitappliestotheApplicationobject.

RegisterSolutionmethodasitappliestotheExternalApplicationobject.

Page 1425: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1426: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ReportErrorMethod

CreatesanErrorobjectandaddsittotheErrorscollection.

expression.ReportError(ByValvarNodeAsVariant,ByValbstrShortErrorMessageAsString,ByValfSiteIndependentAsBoolean,[ByValbstrDetailedErrorMessageAsString],[ByVallErrorCodeAsLong],[ByValbstrTypeAsString="modeless"])AsError

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

varNodeRequiredVariant.TheXMLDocumentObjectModel(DOM)nodethattheerrorisassociatedwith.

bstrShortErrorMessageRequiredString.Thetexttobeusedfortheshorterrormessage.

fSiteIndependentOptionalBoolean.SetstheconditionforautomaticdeletionoftheErrorobject.IfTrue,theErrorobjectwillbedeletedonchangeforanynodesthatmatchedtheXPathexpressioncorrespondingtotheErrorobject.IfFalse,theErrorobjectwillbedeletedwhenthenodereturnedbytheSitepropertyofagiveneventobjecthasbeenchanged.

bstrDetailedErrorMessageOptionalString.Thetexttobeusedforthedetailederrormessage.

lErrorCodeOptionalLong.Thenumbertobeusedastheerrorcode.

bstrTypeOptionalString.Defaultvalueis"modeless".Determineswhetherthechangeinvaluewillbeautomaticallyrejectedorwhethertheuserwillbepromptedtoacceptorrejectthechange.Theothervalueis"modal".

returnsAreferencetoanErrorobject.

Page 1427: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1428: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksWhentheReportErrormethodoftheDataDOMEventobjectiscalled,MicrosoftOfficeInfoPath2003createsanErrorobjectandaddsittotheErrorscollection.Errorsareremovedfromthecollectionwhenthevalidationconstraintisnolongerinvalid,orwhentheyareexplicitlyremovedusingtheDeleteorDeleteAllmethodsoftheErrorscollection.

ErrorscanalsobecreatedusingtheAddmethodoftheErrorscollection.

NoteSite-independenterrorsshouldbeusedwhenyouwanttheerrorstoapplytoallXMLDOMnodesofthesametype.IfyouwanttheerrortoapplytoaspecificXMLDOMnode,usesite-dependenterrors.

Page 1429: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheDataValidationdevelopersampleform,theReportErrormethodoftheDataDOMEventobjectisusedtocreateacustomerrorandaddittotheerrorscollection:

functionmsoxd__total::OnValidate(eventObj){if(parseInt(eventObj.Site.nodeTypedValue,10)>75)eventObj.ReportError(eventObj.Site,"Thetotalistoohigh."+"Thetotalnumberofblockscannotbegreaterthan75.",false);

if(parseInt(eventObj.Site.nodeTypedValue,10)<0)eventObj.ReportError(eventObj.Site,"Thetotalistoolow."+Thetotalnumberofblockscannotbelessthan0.",false);}

Page 1430: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1431: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SaveMethod

SavestheformtotheUniformResourceLocator(URL)thatitiscurrentlyassociatedwith.

expression.Save()

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 1432: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1433: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheSavemethodwillreturnanerrorifcalledfromaformthatisnotfullytrusted.

Page 1434: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSavemethodoftheXDocumentobjectisusedtosaveaform:

XDocument.Save();

Page 1435: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1436: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SaveAsMethod

SavestheformtothespecifiedUniformResourceLocator(URL).

expression.SaveAs(ByValbstrFileUrlAsString)

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

bstrFileUrlRequiredString.TheURLaddressthattheformshouldbesavedto.

Page 1437: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1438: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheSaveAsmethodwillreturnanerrorifcalledfromaformthatisnotfullytrusted.

NoteTheURLthattheformissavedtomustbeinthesamedomainastheformthatcallstheSaveAsmethod.

Page 1439: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSaveAsmethodoftheXDocumentobjectisusedtosaveaform:

XDocument.SaveAs("C:\MyForm.xml");

Page 1440: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SaveStateMethod

DefinesamethodthatInfoPathcallswhenitneedstosavethestateofaninstanceofthecontrolinaview.

expression.SaveState()

expressionRequired.AnexpressionthatreturnsareferencetotheInfoPathControlobject.

Page 1441: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1442: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1443: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SelectNodesMethod

SelectsarangeofnodesinaviewbasedonthespecifiedstartingXMLDocumentObjectModel(DOM)node,theendingXMLDOMnode,andtheviewcontext.

expression.SelectNodes(ByRefpxnStartNodeAsXMLDOMNode,[ByValvarEndNodeAsVariant],[ByValvarViewContextAsVariant])

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

pxnStartNodeRequiredXMLDOMNode.TheXMLDOMnodethatbeginstherange.

varEndNodeOptionalVariant.TheXMLDOMnodethatendstherange.Ifnotspecified,onlythestartingXMLDOMnodewillbeused.

varViewContextOptionalVariant.TheIDofthecontrolthatisusedforthecontext,whichisanelementwiththespecifiedviewcontextofxd:CtrlId.

Page 1444: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1445: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfaviewcontextisspecified,alloftheXMLDOMnodesthataretobeselectedmustbewithinthatcontext.

IfanyoftheargumentstotheSelectNodesmethodarenullorarenotexposedintheview,theSelectNodesmethodwillreturnanerror.Inaddition,iftherearemorethanonesetofviewelementswhichmaptothesamespecifiedXMLDOMnodes,withinthespecifiedviewcontext,thentheSelectNodesmethodwillalsoreturnanerror.

Page 1446: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSelectNodesmethodoftheViewobjectisusedtosetselectiononasingleitemintheview,correspondingtothespecifiedXMLDOMnodeandthen,usingtheGetSelectedNodesmethodoftheViewobject,determineswhethertheselectionhasbeensuccessfulbydisplayinginformationabouttheXMLDOMnodeinamessagebox:

functionSelectEmployee(){varobjXMLNodes;varobjXMLNode;

objXMLNode=XDocument.DOM.selectSingleNode("/employees/employee");XDocument.View.SelectNodes(objXMLNode);

objXMLNodes=XDocument.View.GetSelectedNodes();if(objXMLNodes.Count>0){XDocument.UI.Alert(objXMLNodes(0).nodeName+"\n\n"+objXMLNodes(0).text);}}

Page 1447: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1448: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SelectTextMethod

SelectsthetextcontainedinaneditablefieldthatisboundtothespecifiedXMLDocumentObjectModel(DOM)node.

expression.SelectText(ByRefpxnFieldAsXMLDOMNode,[ByValvarViewContextAsVariant)

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

pxnFieldRequiredXMLDOMNode.TheXMLDOMnode.

varViewContextOptionalVariant.TheIDofthecontrolthatisusedforthecontext,whichisanelementwiththespecifiedviewcontextofxd:CtrlId.

Page 1449: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1450: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfaviewcontextisspecified,thentheeditablefieldthatistobeselectedmustbewithinthatcontext.

IftherearemorethanonesetofviewelementswhichmaptothesamespecifiedXMLDOMnode,withinthegivenviewcontext,thentheSelectTextmethodwillreturnanerror.Inaddition,ifanyoftheargumentstotheSelectTextmethodarenullorarenotexposedintheview,thentheSelectTextmethodwillalsoreturnanerror.

Page 1451: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSelectTextmethodoftheViewobjectisusedtoselectafieldthatisboundtoanXMLDOMnode:

varobjXMLNode;

objXMLNode=XDocument.DOM.selectSingleNode("/employees/employee/name");XDocument.View.SelectText(objXMLNode);

Page 1452: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1453: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SetDataVariableMethod

Setsthevalueofapredefinedvariablestoredasaprocessinginstructionattributeintheform'sunderlyingXMLdocument.

expression.SetDataVariable(ByVallVariableNumberAsLong,ByValbstrVariableValueAsString)

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

lVariableNumberRequiredLong.Thenumberofthevariable.

bstrVariableValueRequiredString.Thevalueofthevariable.

Page 1454: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1455: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfthevariablebeingsetisnotavalidprocessinginstructionattribute,theSetDataVariablemethodwillreturnanerror.

Togetthevalueofavariable,usetheGetDataVariablemethodoftheXDocumentobject.

NoteMicrosoftOfficeInfoPath2003onlysupportsusingtheinitialViewvariable,whichisthevariableusedtospecifytheinitialviewdisplayedwhenaformisopened.Thenumberofthisvariableisalways1,anditsvaluemustbethenameofaviewwithintheform.

Page 1456: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSetDataVariablemethodoftheXDocumentobjectisusedtosetthevalueofthefirstvariable:

XDocument.SetDataVariable(1,"View2");

Page 1457: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SetDirtyMethod

SetstheIsDirtypropertyontheXDocumentobjecttoaBooleanvaluethatindicateswhetherthedatainaMicrosoftOfficeInfoPath2003formhasbeenmodifiedsinceitwaslastsaved.

expression.SetDirty(ByValvfIsDirtyAsBoolean)

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

vfIsDirtyRequiredBoolean.Specifieswhethertheformistobemarkedasunmodifiedornot.

Page 1458: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1459: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheSetDirtymethodcanbeusedfromtheOnSubmitRequesteventhandlertoforceadocumenttobemarkedasunchanged.InfoPathwillthereforenotrequesttheusertosavetheformwhenitisclosed.

TheSetDirtymethodcanalsobeusedfromtheOnSaveRequesteventhandlertoprogrammaticallymarktheformaschangedorunchangedsinceitwaslastsaved.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1460: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theIsDirtypropertyofthecurrentformissettoFalsesothatInfoPathwillnotprompttheusertosavetheformwhenitisclosed.

XDocument.SetDirty(false);

Page 1461: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SetNamedNodePropertyMethod

SetsthevalueofanamedpropertyforthesuppliedXMLnode,whichmustbeanonattributenodeinthemaindatasource.

expression.SetNamedNodeProperty(ByValpxmlMainDOMNodeAsIXMLDOMNode,ByValbstrPropertyNameAsString,ByValbstrValueAsString)

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

pxmlMainDOMNodeRequiredIXMLDOMNode.AnXMLnodecorrespondingtoanonattributenodeinthemaindatasource,forwhichanamedpropertyistobeset.

bstrPropertyNameRequiredString.Specifiesthenameofthepropertybeingset.

bstrValueRequiredString.Specifiesthevaluetowhichthepropertywillbeset.

Page 1462: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1463: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNamedpropertiesallowuserstoassociatestringswithuser-definedpropertiesofXMLelementnodesinthemaindatasource.ThevalueofanamedpropertycanbesetbyusingtheSetNamedNodePropertymethod.UsetheGetNamedNodePropertymethodtoreadthevalueofanamedproperty.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1464: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,thevalueofanamedproperty(withthename"cost")ofanXMLnode(called"item")issetbyusingtheSetNamedNodePropertymethod:

varobjXMLNode=XDocument.DOM.selectSingleNode("/items/item");XDocument.SetNamedNodeProperty(objXMLNode,'cost','100');varstrTest=XDocument.GetNamedNodeProperty(myNode,'cost','empty');

Page 1465: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SetSaveAsDialogFileNameMethod

SetsthedefaultfilenameforaformintheSaveAsdialogbox.

expression.SetSaveAsDialogFileName(ByValstrFileNameAsString)

expressionRequired.AnexpressionthatreturnsareferencetoaUIobject.

strFileNameRequired.ThefilenameoftheformsuppliedtotheSaveAsdialogbox.

Page 1466: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Security2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1467: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfthestrFileNameargumentisnull,"Form"isusedasthefilename.TheSetSaveAsDialogFileNamemethodmaybeusedinconjunctionwiththeSetSaveAsDialogLocationmethod.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1468: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSetSaveAsDialogFileNamemethodoftheUIobjectisusedtosetthedefaultfilenamefortheSaveAsdialogbox:

XDocument.UI.SetSaveAsDialogFileName("StatusReport.xml");

Page 1469: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SetSaveAsDialogLocationMethod

SetstheinitiallocationatwhichtheSaveAsdialogstartstobrowsewhenitisopened.

expression.SetSaveAsDialogLocation(ByValstrLocationUrlAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheUIobject.

strLocationUrlRequired.Thelocation,expressedasaURL,atwhichtheSaveAsdialogboxstartsbrowsing.

Page 1470: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1471: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThelocationspecifiedmustbeanabsolutepathanditshouldnotincludeafilename.InfoPathhandlesinvalidpaths,however,andnoerrormessageisgeneratedifaninvalidpathisspecifiedforthestrLocationUrlargument.TheSetSaveAsDialogLocationmethodmaybeusedinconjunctionwiththeSetSaveAsDialogFileNamemethod.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1472: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSetSaveAsDialogLocationmethodoftheUIobjectisusedtosettheinitiallocationfortheSaveAsdialog:

XDocument.UI.SetSaveAsDialogLocation("\\\\MyShare\\Forms");

Page 1473: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowMailItemMethod

Createsane-mailmessageinthedefaulte-maileditorandattachesthecurrentlyopenMicrosoftOfficeInfoPath2003formtothemessage.

expression.ShowMailItem(ByValbstrToAsString,ByValbstrCCAsString,ByValbstrBCCAsString,ByValbstrSubjectAsString,ByValbstrBodyAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheUIobject.

bstrToRequiredString.Thee-mailaddresstosendthee-mailmessageto.

bstrCCRequiredString.Thee-mailaddresstocopythee-mailmessageto.

bstrBCCRequiredString.Thee-mailaddresstoblindcopythee-mailmessageto.

bstrSubjectRequiredString.Thesubjectofthee-mailmessage.

bstrBodyRequiredString.Thebodytextofthee-mailmessage.

Page 1474: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1475: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAfterthee-mailmessageiscreated,thedefaulte-maileditorwilldisplaythee-mailmessage;userscantheninspectandeditthee-mailmessagebeforesendingit.TheShowMailItemmethodwillreturnanerrorifnoe-maileditingprogramisavailable.

NoteTheShowMailItemmethoddoesnotsendthee-mailmessagesitcreates;usersmustmanuallysendthee-mailmessages.

YoucanalsousetheMailEnvelopeobject,accessedthroughtheMailEnvelopepropertyoftheWindowobject,toprogrammaticallycreatee-mailmessages.

Page 1476: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theShowMailItemmethodoftheUIobjectisusedtocreateacustome-mailmessage:

XDocument.UI.ShowMailItem("[email protected]","","","UpdatedForm","Hereistheupdatedformthatyourequested.");

Page 1477: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1478: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowModalDialogMethod

DisplaysacustommodaldialogboxinaMicrosoftOfficeInfoPath2003form.

expression.ShowModalDialog(ByValbstrNameAsString,[ByValvarArgumentsAsVariant],[ByValvarHeightAsVariant],[ByValvarWidthAsVariant],[ByValvarTopAsVariant],[ByValvarLeftAsVariant])AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheUIobject.

bstrNameRequiredString.Thenameofthe.htmlfileusedforthemodaldialogbox.

varArgumentsOptionalVariant.Specifiestheargumentstousewhendisplayingthemodaldialogbox.Canbeanytypeofvalue,includinganarrayofvalues.

varHeightOptionalVariant.Setstheheightofthemodaldialogbox.

varWidthOptionalVariant.Setsthewidthofthemodaldialogbox.

varTopOptionalVariant.Setsthetoppositionofthemodaldialogboxrelativetotheupperleftcornerofthedesktop.

varLeftOptionalVariant.Setstheleftpositionofthemodaldialogboxrelativetotheupperleftcornerofthedesktop.

returnsVariant.

Page 1479: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1480: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheShowModalDialogmethodoftheUIobjectallowsyoutodisplaycustomdialogboxestousersastheyfilloutafullytrustedform.Customdialogboxesareimplementedas.htmlfilescreatedinanytypeofHTMLeditor,suchasMicrosoftFrontPage.YoucanusescriptingcodeinacustomdialogboxthatinteractswiththeInfoPathobjectmodelifyoupassobjectstothecustomdialogboxusingthevarArgumentsparameter.

TouseacustomdialogboxinanInfoPathform,youmustfirstaddthe.htmlfileofthecustomdialogboxtotheform'ssetofresourcefilesbyusingtheResourceManagerdialogbox.TheResourceManagerdialogboxisavailablefromtheToolsmenuindesignmode.Afteryouhaveaddedthecustomdialogboxfiletotheform,youcanusetheShowModalDialogmethodtodisplayit.

NoteAlthoughtheShowModalDialogmethodcanonlybeusedinfullytrustedforms,youcancreateacustomdialogboxinstandardformsusingtheshowModalDialogmethodoftheDynamicHTML(DHTML)objectmodel.

Page 1481: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theShowModalDialogmethodoftheUIobjectisusedtodisplayacustomdialogbox.NotethattheXDocumentobjectispassedtothecustomdialogboxusingthevarArgumentsparameter.

XDocument.UI.ShowModalDialog("SimpleDialog.htm",XDocument);

ThefollowingexampleistheHTMLcodeusedtoimplementasimplecustomdialogbox.NotetheuseofthedialogArgumentspropertyoftheDHTMLwindowobjecttogetthevaluespassedtothecustomdialogbox,whichinthiscaseistheXDocumentobjectoftheInfoPathobjectmodel,fromtheShowModalDialogmethod.WhenauserclickstheShowAlertbuttoninthecustomdialogbox,thesourceXMLoftheform'sunderlyingXMLdocumentappearsinamessagebox.

<html><head><scriptlanguage="jscript">vargobjXDocument=null;

functionInitialize(){//SaveareferencetotheXDocumentobject.if(typeofwindow.dialogArguments=="object")gobjXDocument=window.dialogArguments;}</script>

<title>ASimpleCustomDialogBox</title></head>

<bodystyle="BACKGROUND-COLOR:window"onLoad="Initialize()"><strong>Clickoneofthefollowingbuttons:</strong>

Page 1482: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<br/><br/><divid="divButtons"tyle="align:center"><inputid="btnShowAlert"style="WIDTH:106px;HEIGHT:24px"onclick='gobjXDocument.UI.Alert(gobjXDocument.DOM.xml);'type="button"size="21"value="ShowAlert"></input><inputid="btnCancel"style="WIDTH:106px;HEIGHT:24px"onclick="window.close();"type="button"size="21"value="Cancel"></input></div></body></html>

Page 1483: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowSignatureDialogMethod

DisplaystheMicrosoftOfficeInfoPath2003DigitalSignaturesdialogbox.

expression.ShowSignatureDialog()

expressionRequired.AnexpressionthatreturnsareferencetotheUIobject.

Page 1484: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1485: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheShowSignatureDialogmethodcanbeusedonlyinformsthathavebeenenabledfordigitalsigning.Themethodwillreturnanerrorifusedinaformthatisnotenabledfordigitalsigning.

Page 1486: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theShowSignatureDialogmethodoftheUIobjectisusedtodisplaytheInfoPathDigitalSignaturesdialogbox:

XDocument.UI.ShowSignatureDialog();

Page 1487: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignMethod(Index)

ThismethodisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaSignmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheSignmethod.

SignmethodasitappliestotheSignatureobject.

SignmethodasitappliestotheSignedDataBlockobject.

Page 1488: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignMethod(SignatureObject)

WritestheXMLdigitalsignatureblockandcomputesthecryptographichashforthesigneddata.ThismethodcanonlybecalledfromtheOnSigneventhandler.CallingthismethoddisplaystheDigitalSignaturesdialogbox.

expression.Sign()

expressionRequired.AnexpressionthatreturnsareferencetoaSignatureobject.

Page 1489: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1490: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsetheCreatemethodoftheSignaturescollectiontocreateadigitalsignature.Then,usetheSignmethodtowritethedigitalsignature.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1491: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1492: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SignMethod(SignedDataBlockObject)

InvokestheDigitalSignaturesdialogboxtoaddadigitalsignaturetoasetofsigneddatainaMicrosoftOfficeInfoPath2003form.Thenewsignatureusesthedefaultsignaturetemplate,anditisappliedtotheSignedDataBlockobject.

expression.Sign()

expressionRequired.AnexpressionthatreturnsareferencetoaSignedDataBlockobject.

Page 1493: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1494: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1495: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitMethod(ADOAdapterObject)

Executesthesubmitoperationontheassociatedadapter.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoaADOAdapterobject.

Page 1496: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1497: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksFailsiftheSubmitAllowedpropertyoftheADOAdapterobjectisFalse.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1498: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitMethod(DAVAdapterObject)

Executesthesubmitoperationontheassociatedadapter.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoaDAVAdapterobject.

Page 1499: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1500: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheSubmitmethodoftheDAVAdapterobjectsubmitstheform'sentireunderlyingXMLdocument,whereastheSubmitDatamethodoftheDAVAdapterobjectcansubmitanyXMLDOMelementordocument.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1501: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitMethod(EmailAdapterObject)

Executesthesubmitoperationontheassociatedadapter.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

Page 1502: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1503: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheSubmitmethodoftheEmailAdapterobjectsubmitstheform'sentireunderlyingXMLdocument,whereastheSubmitDatamethodoftheEmailAdapterobjectcansubmitanyXMLDOMelementordocument.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1504: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitMethod(HWSAdapterObject)

Executesthesubmitoperationfortheassociatedadapter.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoanHWSAdapterobject.

Page 1505: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1506: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1507: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1508: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitMethod(Index)

TheSubmitmethodexecutesthesubmitoperationontheassociateddataadapter.ThismethodisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaSubmitmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheSubmitmethod.

SubmitmethodasitappliestotheADOAdapterobject.

SubmitmethodasitappliestotheDAVAdapterobject.

SubmitmethodasitappliestotheEmailAdapterobject.

SubmitmethodasitappliestotheHWSAdapterobject.

SubmitmethodasitappliestotheSharepointListAdapterobject.

SubmitmethodasitappliestotheWebServiceAdapterobject.

SubmitmethodasitappliestotheXDocumentobject.

SubmitmethodasitappliestotheXMLFileAdapterobject.

Page 1509: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitMethod(SharePointListAdapterObject)

TheSubmitmethodisavailablefortheSharepointListAdapterobjectbut,becausetheSharePointListAdapterobjectisavailableforreceivingdataonly,themethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoaSharepointListAdapterobject.

Page 1510: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1511: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1512: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitMethod(WebServiceAdapterObject)

Executesthesubmitoperationontheassociatedadapter.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

Page 1513: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1514: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksFailsiftheSubmitAllowedpropertyoftheWebServiceAdapterobjectisFalse.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1515: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1516: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitMethod(XDocumentObject)

ExecutesthepredefinedsubmitoperationinaMicrosoftOfficeInfoPath2003form.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

Page 1517: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1518: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsingtheSubmitmethodissimilarto,butnotexactlylike,usingthesubmitoperationfromtheInfoPathuserinterface.CallingtheSubmitmethodsimplyperformsthesubmitoperation,butthesubmitoperationmustfirstbeenabledforaformindesignmode.

NoteYoucanwriteacustomsubmitoperationusingtheOnSubmitRequestevent,andthenyoucanprogrammaticallycalltheeventusingtheSubmitmethod.

Page 1519: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSubmitmethodoftheXDocumentobjectisusedtosubmittheformusingthepredefinedsubmitoperation:

XDocument.Submit();

Page 1520: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitMethod(XMLFileAdapterObject)

TheSubmitmethodisavailablefortheXMLFileAdapterobjectbut,becausetheXMLFileAdapterobjectisavailableforreceivingdataonly,themethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoaXMLFileAdapterobject.

Page 1521: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1522: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1523: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1524: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitDataMethod(DavAdapterObject)

SubmitsthespecifiedDOMelementorDOMdocumenttoadataadapter.

expression.SubmitData(ByValpDataAsIXMLDOMNode)

expressionRequired.AnexpressionthatreturnsareferencetoaDAVAdapterobject.

pDataRequiredIXMLDOMNode.TheXMLdatathatistobemergedintothecurrentlyopenform.

Page 1525: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1526: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1527: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1528: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitDataMethod(EmailAdapterObject)

SubmitsthespecifiedDOMelementorDOMdocumenttoadataadapter.

expression.SubmitData(ByValpDataAsIXMLDOMNode)

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

pDataRequiredIXMLDOMNode.TheXMLdatathatistobemergedintothecurrentlyopenform.

Page 1529: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1530: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1531: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1532: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SubmitDataMethod(Index)

TheSubmitDatamethodexecutesthesubmitoperationfortheassociateddataadapter.ThismethodisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaSubmitDatamethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheSubmitDatamethod.

SubmitDatamethodasitappliestotheDAVAdapterobject.

SubmitDatamethodasitappliestotheEmailAdapterobject.

Page 1533: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SwitchViewMethod

ChangestheactiveviewofaMicrosoftOfficeInfoPath2003formtoaspecifiedview.

expression.SwitchView(ByValbstrNameAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

bstrNameRequiredString.Thenameoftheviewtoswitchto.Ifanemptystringisused,thedefaultviewisdisplayed.

Page 1534: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 1535: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfanemptystringisusedasthebstrNameparameter,theviewischangedtothedefaultviewoftheform.

Page 1536: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theSwitchViewmethodoftheViewobjectisusedtochangethecurrentviewtothedefaultview:

XDocument.View.SwitchView("");

Page 1537: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

TodayMethod

ReturnsaVariantcontainingthecurrentsystemdateinISOformat(yyyy-mm-dd).

expression.Today()AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheDateobject.

returnsAVariantcontainingthecurrentsystemdate.

Page 1538: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel0:Canbeaccessedwithoutrestrictions.

Page 1539: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1540: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,thevariablecurrentDateissettothecurrentsystemdate.

varcurrentDate=XDocument.Util.Date.Today();

Page 1541: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UninitMethod

Definesamethodthatmustbeprovidedbythedevelopertoperformanycleanuproutinesthatarerequiredbeforeaninstanceofthecontrolisremovedfromaview.

expression.Uninit()

expressionRequired.AnexpressionthatreturnsareferencetotheInfoPathControlobject.

Page 1542: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksInfoPathcallstheUninitmethodimmediatelybeforethecontrolisremovedfromtheviewanddestroyed.NotethatbecauseInfoPathformsmakeuseofXSLtransformstorepresentviews,anychangesinthedataorexplicitcallstotheobjectmodelcancauseInfoPathtoautomaticallysynchronizetheviewwiththedatathatiscontainedinaform'sunderlyingXMLdocument,whichdestroysandrecreatestheview.ThismeansthatActiveXcontrolsarelikelytobecreatedanddestroyedmuchmoreoftenwithinagivensessionthancontrolsinVisualBasicformsorWebforms.ActiveXcontrolswhichneedtopreservestateinformationindependentofthebounddata,suchasthestateofthescrollposition,shouldcreateroutinesintheInitmethodofthecontrolthatusetheSetNamedNodePropertymethodtosavethisinformation,andusetheGetNamedNodePropertymethodtorestorestateinformationduringtheInitmethodcall.

TheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1543: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1544: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UnregisterSolutionMethod(ApplicationObject)

UninstallsthespecifiedMicrosoftOfficeInfoPath2003formtemplate.

expression.UnregisterSolution(ByValbstrSolutionURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetoanApplicationobject.

bstrSolutionURIRequiredString.ThestringthatspecifiestheUniformResourceIdentifier(URI)oftheformtemplate.

Page 1545: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1546: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheformtemplatecannotbeunregistered,theUnregisterSolutionmethodwillreturnanerror.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1547: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingVisualBasicforApplications(VBA)example,theUnregisterSolutionmethodoftheApplicationobjectisusedtouninstallaformtemplate:

PublicSubUninstallForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.Application")

'UnregistertheInfoPathformtemplate.objIP.UnregisterSolution("C:\\MyForms\\MyFormTemplate.xsn")MsgBox("TheInfoPathformtemplatehasbeenunregistered.")

SetobjIP=Nothing

EndSub

Page 1548: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1549: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UnregisterSolutionMethod(ExternalApplicationObject)

UninstallsthespecifiedMicrosoftOfficeInfoPath2003formtemplate.

expression.UnregisterSolution(ByValbstrSolutionURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrSolutionURIRequiredString.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)oftheformtemplate.

Page 1550: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

Page 1551: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheformtemplatecannotbeunregistered,theUnregisterSolutionmethodwillreturnanerror.

Page 1552: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theUnregisterSolutionmethodoftheExternalApplicationobjectisusedtouninstallaformtemplate:

PublicSubUninstallForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'UnregistertheInfoPathformtemplate.objIP.UnregisterSolution("C:\\MyForms\\MyFormTemplate.xsn")MsgBox("TheInfoPathformtemplatehasbeenunregistered.")

SetobjIP=Nothing

EndSub

Page 1553: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1554: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UnregisterSolutionMethod(Index)

TheUnregisterSolutionmethoduninstallsthespecifiedMicrosoftOfficeInfoPath2003formtemplate.ThismethodisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickanUnregisterSolutionmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheUnregisterSolutionmethod.

UnregisterSolutionmethodasitappliestotheApplicationobject.

UnregisterSolutionmethodasitappliestotheExternalApplicationobject.

Page 1555: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1556: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OnAfterChangeEvent

Occursafterchangestoaform'sunderlyingXMLdocumenthavebeenacceptedandaftertheOnValidateeventhasoccurred.

Functionnode::OnAfterChange(ByRefpDataDOMEventAsDataDOMEvent)

pDataDOMEventRequiredDataDOMEvent.AreferencetotheDataDOMEventobject.

Page 1557: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThiseventhandlerdoesnotallowuserstocancelanoperation.

TheOnAfterChangeeventistypicallyusedforchangingdatainaformafterotherchangeshaveoccurred—forexample,makingcalculationsorchangingthestructureofaform'sunderlyingXMLdocument.

NoteInsomecases,eventsrelatedtochangesinaform'sunderlyingXMLdocumentmayoccurmorethanonce.Forexample,whenexistingdataischanged,aninsertanddeleteoperationoccurs.

Page 1558: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheEventsdevelopersampleform,theOnAfterChangeeventhandlerisusedtocallacustomfunctionthatperformscalculations:

functionmsoxd__ContactDates::OnAfterChange(eventObj){if(eventObj.IsUndoRedo){//AnundoorredooperationhasoccurredandtheDOMisread-only.return;}CalculateTotalCampaignCost();}

Page 1559: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1560: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OnAfterImportEvent

Occursaftertheimport(ormerge)operationhassuccessfullycompleted.

FunctionXDocument::OnAfterImport(ByRefpEventAsDocEvent)

pEventRequiredDocEvent.AreferencetotheDocEventobject.

Page 1561: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThiseventhandlerdoesnotallowuserstocancelanoperation.

Ifthemergeoperationincludesmergingmultipleforms,theOnAfterImporteventoccursonlyafterallformshavebeenmergedandthecompleteoperationissuccessful.

NoteTheOnAfterImporteventhandlercannotbecreatedusingMicrosoftOfficeInfoPath2003designmode;itmustbecreatedmanually.

CreatingtheOnAfterImporteventhandler

Page 1562: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theOnAfterImporteventhandlerisusedtodisplayamessageboxthatinformstheuserthatthemergeoperationcompletedsuccessfully:

functionXDocument::OnAfterImport(eventObj){XDocument.UI.Alert("Mergeoperationwassuccessful.")}

Page 1563: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1564: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OnBeforeChangeEvent

Occursafterchangestoaform'sunderlyingXMLdocumenthavebeenmadebutbeforethechangesareaccepted.

Functionnode::OnBeforeChange(ByRefpDataDOMEventAsDataDOMEvent)

pDataDOMEventRequiredDataDOMEvent.AreferencetotheDataDOMEventobject.

Page 1565: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThiseventhandlerallowsuserstocancelanoperation.

DuringtheOnBeforeChangeevent,theform'sunderlyingXMLdocumentisplacedinread-onlymode.IftheReturnStatuspropertyoftheDataDOMEventobjectissettoFalse,MicrosoftOfficeInfoPath2003rejectsthechangesthatweremadeandamessageboxisdisplayedtotheuser.IfanerroroccursinthescriptingcodefortheOnBeforeChangeeventhandler,InfoPathrejectsthechangesandrestoresthedatatoitspreviousstate.

Notes

ItisbesttoavoidswitchingviewsduringtheOnBeforeChangeevent;changeshavenotyetbeenaccepted,andswitchingtoanotherviewmayresultinanerror.

Insomecases,eventsrelatedtochangesinaform'sunderlyingXMLdocumentmayoccurmorethanonce.Forexample,whenexistingdataischanged,aninsertanddeleteoperationoccurs.

IfavalidationerrorisencounteredinanyOnBeforeChangeeventhandler,thedocumentfailstoload.Atry-catchblockintheOnLoadeventcanbeusedtocatchthisvalidationfailureandtoloadthedocumentdespitetheerror.

Page 1566: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheEventsdevelopersampleform,theOnBeforeChangeeventhandlerisusedtovalidatethedatainafield.Ifthedataisnotvalid,theReturnStatuspropertyoftheDataDOMEventobjectisusedtorejectthechanges.

functionmsoxd__RepVisitDt::OnBeforeChange(eventObj){varoNode=XDocument.DOM.selectSingleNode("/Customers/CustomerInfo/ContactDates/PhoneContactDt");

if(!oNode.text){eventObj.ReturnMessage="ThePhoneContactStartdatemustbesetpriortotheRepresentativeVisitdate.";eventObj.ReturnStatus=false;return;}

//Ifthedataisvalid,eventObj.ReturnStatus=true.eventObj.ReturnStatus=true;return;}

Page 1567: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1568: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OnClickEvent

OccurswhenabuttoncontrolisclickedwithinaviewinaMicrosoftOfficeInfoPath2003form.

FunctionScriptID::OnClick(ByRefeventObjAsDocActionEvent)

eventObjRequiredDocActionEvent.AreferencetotheDocActionEventobject.

Page 1569: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThiseventhandlerdoesnotallowuserstocancelanoperation.

NoteTheOnClickeventfortheInfoPathbuttoncontrolistheonlycontroleventthatissupported.

Page 1570: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheEventsdevelopersampleform,theOnClickeventhandlerisusedtoperformdatavalidationonsomeofthefieldscontainedintheNewCustomerviewwhenauserclicksabuttontoswitchtoanotherview:

functionbtnSwitchContact::OnClick(eventObj){if(XDocument.View.Name=="NewCustomer"){if(XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/CustomerName').text==""&&XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/CustomerID').text==""){XDocument.UI.Alert("TheCustomerNameandIDmust"+"befilledinpriortoswitchingtheview.");return;}elseif(XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/CustomerName').text==""){XDocument.UI.Alert("TheCustomerNamemustbefilled"+"inpriortoswitchingtheview.");return;}elseif(XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/CustomerID').text==""){XDocument.UI.Alert("TheCustomerIDmustbefilledin"+"priortoswitchingtheview.");return;

Page 1571: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

}}XDocument.View.SwitchView('ContactCustomer');}

Page 1572: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1573: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OnContextChangeEvent

Occursafterthecontextnodechanges.

FunctionXDocument::OnContextChange(ByRefpEventAsDocContextChangeEvent)

pEventRequiredDocContextChangeEvent.AreferencetotheDocContextChangeEventobject.

Page 1574: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecontextnodeistheXMLDOMnodemappedtotheviewthatcorrespondstothecontainer(oritem)withthecurrentXMLselection.Forexample,ifthecurrentselectionintheviewisinatextbox,thecontextnodeisthenodetowhichthetextboxisbound.Ifthecurrentselectionisarepeatingsection,thecontextnodeisthenodeforthatitem.Iftworepeatingsectionsareselected,thecontextnodeistheancestorXMLDOMforbothitemsmappedtotheview.

TheOnContextChangeeventisasynchronous.Itdoesnotfireoneverychangeinthecontextnode;instead,itfiresaftertheapplicationhasstoppedprocessingotherevents.

Whenthedocumentloads,orwhenaviewchangeoccurs,theOnContextChangeeventwilloccuraftertheOnLoadandOnSwitchVieweventsoccur.

WhentheIsUndoRedopropertyoftheDocContextChangeEventobjectisTrue,thecontextchangewascausedbyauser'sundoorredooperationratherthananexplicitusercontextchange.OperationsperformedwithintheOnContextChangeeventhandlerthatmodifytheXMLDOMshouldbeavoidedinresponsetoundoorredooperations,becausetheymayinterferewiththeuser'sintentiontorevertdatatoapreviousstate.

Forrichtextboxcontrols,theOnContextChangeeventisnotraisedforcontextchangeswithintheXHTMLcontent—thatis,selectionchangestotherichtextinthecontrol.TheGetContextNodesmethodcanbeusedtodeterminetheselectionwithinrichtextboxcontrols.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1575: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,instructionsspecifictodifferentcontextnodesinaformareaddedtothebodyofacustomtaskpane:

functionXDocument::OnContextChange(eventObj){varoContextNode=eventObj.Context;

varstrText="";if(oContextNode.nodeName=="my:root")strText="";elseif(oContextNode.nodeName=="my:singleName")strText="Typeyourfullname.";elseif(oContextNode.nodeName=="my:webSite")strText="TypetheWebaddressofyourpersonalwebpage.";

varoTaskPane=XDocument.View.Window.TaskPanes.Item(0);oTaskPane.HTMLDocument.body.innerText=strText;}

Page 1576: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1577: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OnLoadEvent

OccursafteraMicrosoftOfficeInfoPath2003formhasbeenloaded,butbeforeanyviewshavebeeninitialized.

FunctionXDocument::OnLoad(ByRefpEventAsDocReturnEvent)

pEventRequiredDocReturnEvent.AreferencetotheDocReturnEventobject.

Page 1578: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThiseventhandlerallowsuserstocancelanoperation.

IftheReturnStatuspropertyoftheDocReturnEventobjectissettoFalse,InfoPathcancelstheloadingoftheform.IfanerroroccursinthescriptingcodefortheOnLoadeventhandler,InfoPathignoresitandreliesontheReturnStatuspropertyoftheDocReturnEventobject.IftheReturnStatuspropertyisnotexplicitlyset,thedefaultvalueofTrueisused.

NoteWhentheOnLoadeventoccurs,theviewisnotinitializedandtheXSLTransformation(XSLT)usedfortheviewisnotyetloaded.TheXDocumentobjectisnotaddedtotheXDocumentscollectionuntilaftertheOnLoadeventhasoccurred.However,theXDocumentobjectisavailableduringtheOnLoadevent.

Page 1579: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheSalesReportsampleform,theOnLoadeventhandlerisusedtodeterminewhethertheformhasbeendigitallysigned,andifithasn't,toinitializesomedatevaluesusingacombinationofscriptingfunctionsandcustomfunctions:

functionXDocument::OnLoad(objEvent){//AvoidDOMupdateswhenthedocumenthasbeendigitallysigned.if(XDocument.IsSigned)return;

vartoday=newDate();initializeNodeValue("/sls:salesReport/sls:date",getDateString(today));initializeNodeValue("/sls:salesReport/sls:year",today.getFullYear());}

ThisOnloadeventhandlerexampledependsontwocustomfunctions,whicharealsofromtheSalesReportsampleform:initializeNodeValueandsetNodeValue.

functioninitializeNodeValue(xpath,strValue){varxmlNode=getNode(xpath);

//Setthenodevalue*ONLY*ifthenodeisempty.if(xmlNode.text=="")setNodeValue(xmlNode,strValue);}

functionsetNodeValue(xpath,value){varxmlNode=getNode(xpath);

Page 1580: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

if(!xmlNode)return;

//Thexsi:nilneedstoberemovedbeforewesetthevalue.if(value!=""&&xmlNode.getAttribute("xsi:nil"))xmlNode.removeAttribute("xsi:nil");

//Settingthevaluewouldmarkthedocumentasdirty.//Let'sdothatifthevaluehasreallychanged.if(xmlNode.text!=value)xmlNode.text=value;}

Page 1581: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1582: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OnMergeRequestEvent

OccurswhenthemergeoperationisinvokedeitherfromtheMicrosoftOfficeInfoPath2003userinterfaceorfromthecommandlinebyusingthe/aggregateoption.

FunctionXDocument::OnMergeRequest(ByRefpEventAsMergeEvent)

pEventRequiredMergeEvent.AreferencetotheMergeEventobject.

Page 1583: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheReturnStatuspropertyoftheMergeEventobjectissettoFalse,InfoPathcancelsthemergeoperation.IfanerroroccursinthecodefortheOnMergeRequesteventhandler,InfoPathignorestheerrorandreliesontheReturnStatuspropertyoftheMergeEventobject.IftheReturnStatuspropertyisnotexplicitlyset,thedefaultvalueofFalseisused.

ForInfoPathformsstoredinaWindowsSharePointServicesformlibrary,theOnMergeRequesteventalsooccurswhentheMergeDocuments2methodoftheOpenXMLDocumentscontrolisexecuted.FormoreinformationontheOpenXMLDocumentscontrol,seetheSharePointProductsandTechnologies2003SoftwareDevelopmentKit,whichisavailableontheMicrosoftSharePointProductsandTechnologiesWebsite.

IfyoucreateaneventhandlerfortheOnMergeRequesteventofaformtemplate,youmustedittheformdefinitionfile(.xsf)tosettheuseScriptHandlerattributeto"yes"beforeitwillrun.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1584: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theOnMergeRequesteventhandlerperformsamergeoperation,anditsetsvariablestoindicatethestatusofthemergeoperation:

varg_fMerging=false;

functionXDocument::OnMergeRequest(eventObj){//Setglobalpropertytoindicatethatformsarebeingmerged.if(eventObj.Index==0)g_fMerging=true;

XDocument.ImportDOM(eventObj.DOM);eventObj.ReturnStatus=true;if(eventObj.Index+1==eventObj.Count){g_fMerging=false;XDocument.UI.Alert("Yourrequesttomerge"+eventObj.Count+"filesisnowcomplete.");}}

Page 1585: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OnSaveRequestEvent

OccurswhenthesaveoperationisinvokedfromtheMicrosoftOfficeInfoPath2003userinterfaceorbyusingtheSaveorSaveAsmethodoftheXDocumentobjectintheInfoPathobjectmodel.

FunctionXDocument::OnSaveRequest(ByRefpEventAsSaveEvent)

pEventRequiredSaveEvent.AreferencetotheSaveEventobject.

Page 1586: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheReturnStatuspropertyoftheSaveEventobjectissettoFalse,InfoPathcancelsthesaveoperation.IfanerroroccursinthecodefortheOnSaveRequesteventhandler,InfoPathignorestheerrorandreliesontheReturnStatuspropertyoftheSaveEventobject.IftheReturnStatuspropertyisnotexplicitlyset,thedefaultvalueofFalseisused.

TheReturnStatuspropertyworksinconjunctionwiththeIsCancelledpropertywhentheInfoPathformisclosing.Ifthedocumenthaschangesthathavenotbeensavedandtheusercancelsthesaveoperation,theIsCancelledpropertycanbesettoTruetoallowInfoPathtoclose.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1587: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theOnSaveRequesteventhandlerisusedtocreateanXMLHTTPobjectfortransportingtheform'sunderlyingXMLdocument:

functionXDocument::OnSaveRequest(eventObj){ //Writethecodetoberunbeforesavinghere.

XDocument.UI.Alert("Beginsavingform.");

eventObj.IsCancelled=eventObj.PerformSaveOperation();

//Writethecodetoberunaftersavinghere.

XDocument.UI.Alert("Formsaved.");

eventObj.ReturnStatus=true;}

Page 1588: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OnSignEvent

Occursafterasetofsigneddatahasbeenselectedtosign.

FunctionXDocument::OnSign(ByRefpEventAsSignEvent)

pEventRequiredSignEvent.AreferencetotheSignEventobject.

Page 1589: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksYoucanusethiseventtoaddadditionaldatatothedigitalsignature.Forexample,youcanadddatafromatrustedtimestampserver,oraddaserver-sidecountersignatureofthetransaction.Youcanalsousethiseventtoblocksigningifthecurrentuserisnotamemberofaparticulargroup.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1590: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1591: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OnSubmitRequestEvent

OccurswhenthesubmitoperationisinvokedeitherfromtheMicrosoftOfficeInfoPath2003userinterfaceorbyusingtheSubmitmethodoftheXDocumentobjectintheInfoPathobjectmodel.

FunctionXDocument::OnSubmitRequest(ByRefpEventAsDocReturnEvent)

pEventRequiredDocReturnEvent.AreferencetotheDocReturnEventobject.

Page 1592: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThiseventhandlerallowsuserstocancelanoperation.

IftheReturnStatuspropertyoftheDocReturnEventobjectissettoFalse,InfoPathcancelsthesubmitoperation.IfanerroroccursinthescriptingcodefortheOnSubmitRequesteventhandler,InfoPathignoresitandreliesontheReturnStatuspropertyoftheDocReturnEventobject.IftheReturnStatuspropertyisnotexplicitlyset,thedefaultvalueofFalseisused.

Page 1593: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexample,theOnSubmitRequesteventhandlerisusedtocreateanXMLHTTPobjectfortransportingtheform'sunderlyingXMLdocument:

functionXDocument::OnSubmitRequest(eventObj){//CreateanXMLHTTPobjectfordocumenttransport.try{varobjXmlHttp=newActiveXObject("MSXML2.XMLHTTP");}catch(ex){XDocument.UI.Alert("CouldnotcreateMSXML2.XMLHTTPobject.\r\n"+ex.number+"-"+ex.description);

//ReturnwitheventObj.ReturnStatus==false,//becausenochangewasmadetothisvalue.return;}

//PosttheXMLdocumenttostrUrl.objXmlHttp.open("POST",strUrl,false);try{objXmlHttp.send(XDocument.DOM.xml);}catch(ex){XDocument.UI.Alert("Couldnotpost(ASP)documentto"+

Page 1594: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

strUrl+"\r\n"+ex.number+"-"+ex.description);

//ReturnwitheventObj.ReturnStatus==false.return;}//Ifhere,thesubmitoperationishasbeensuccessful.eventObj.ReturnStatus=true;}

Page 1595: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1596: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OnSwitchViewEvent

OccursafteraviewinaMicrosoftOfficeInfoPath2003formhasbeensuccessfullyswitched.

FunctionXDocument::OnSwitchView(ByRefpEventAsDocEvent)

pEventRequiredDocEvent.AreferencetotheDocEventobject.

Page 1597: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThiseventhandlerdoesnotallowuserstocancelanoperation.

NoteTheOnSwitchVieweventalsooccurswhenaformisfirstopened.

Page 1598: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheEventsdevelopersampleform,theOnSwitchVieweventhandlerisusedtocheckthenameofthecurrentview.Iftheviewhasthename"ArchiveCustomer,"dataisaddedtotheform'sunderlyingXMLdocument.

functionXDocument::OnSwitchView(eventObj){varoDate=newDate();

if(XDocument.View.Name=="ArchiveCustomer"){varoNotesNode=XDocument.DOM.selectSingleNode("/Customers/CustomerInfo/Notes");varoDivNode=XDocument.DOM.createNode(1,"div","http://www.w3.org/1999/xhtml");

oDivNode.text="Noterecorded"+oDate.toString();oNotesNode.appendChild(oDivNode);}}

Page 1599: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1600: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OnValidateEvent

Occursafterchangestoaform'sunderlyingXMLdocumenthavebeenacceptedbutbeforetheOnAfterChangeeventoccurs.

Functionnode::OnValidate(ByRefpDataDOMEventAsDataDOMEvent)

pDataDOMEventRequiredDataDOMEvent.AreferencetotheDataDOMEventobject.

Page 1601: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThiseventhandlerdoesnotallowuserstocancelanoperation.

DuringtheOnValidateevent,theform'sunderlyingXMLdocumentisplacedinread-onlymode.

TheOnValidateeventistypicallyusedforhandlingerrorsandworkingwiththeErrorscollection—forexample,addingnewerrorsordeletingexistingones.

NoteInsomecases,eventsrelatedtochangesinaform'sunderlyingXMLdocumentmayoccurmorethanonce.Forexample,whenexistingdataischanged,aninsertanddeleteoperationoccurs.

Page 1602: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingpartialexamplefromtheEventsdevelopersampleform,theOnValidateeventhandlerisusedtovalidatecontactinformation.Ifthedataisinvalid,theReportErrormethodoftheDataDOMEVentobjectisusedtocreateanerror.

functionmsoxd__ContactDates::OnValidate(eventObj){variNumberOfDays=0;varobjEmailDate=XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/ContactDates/EmailCampaignDt');varobjPhoneContactDate=XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/ContactDates/PhoneContactDt');varobjRepVisitDate=XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/ContactDates/RepVisitDt');

//Firstvalidatetheemailandphonecontactdates.if(!objEmailDate||!objPhoneContactDate)return;

varemailDate=newDate(objEmailDate.text.replace(/(.*)-(.*)-(.*)/,"$2-$3-$1"));varphoneContactDate=newDate(objPhoneContactDate.text.replace(/(.*)-(.*)-(.*)/,"$2-$3-$1"));

if(isNaN(emailDate)||isNaN(phoneContactDate))return;

//Getthenumberofdaysbetweenthetwodates.iNumberOfDays=GetElapsedDays(emailDate,phoneContactDate);

if(iNumberOfDays<REQUIRED_PHONE_EMAIL_INTERVAL)

Page 1603: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

eventObj.ReportError(objPhoneContactDate,"ThePhoneContactStartdatemustoccurafter"+REQUIRED_PHONE_EMAIL_INTERVAL+"daysfromthestartoftheEmailCampaign.",false);...}

Page 1604: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1605: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

OnVersionUpgradeEvent

OccurswhentheversionnumberofaMicrosoftOfficeInfoPath2003formbeingopenedisolderthantheversionnumberoftheformtemplateonwhichitisbased.

FunctionXDocument::OnVersionUpgrade(ByRefpEventAsVersionUpgradeEvent)

pEventRequiredVersionUpgradeEvent.AreferencetotheVersionUpgradeEventobject.

Page 1606: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThiseventhandlerallowsuserstocancelanoperation.

DuringtheOnVersionUpgradeevent,theform'sunderlyingXMLdocumentisplacedinread-onlymode,anditisnotvalidatedagainsttheform'sassociatedXMLSchema.IftheReturnStatuspropertyoftheVersionUpgradeEventobjectissettoFalse,InfoPathcancelstheopeningoftheform.IfanerroroccursinthescriptingcodefortheOnVersionUpgradeeventhandler,InfoPathignoresitandreliesontheReturnStatuspropertyoftheVersionUpgradeEventobject.IftheReturnStatuspropertyisnotexplicitlyset,thedefaultvalueofTrueisused.

Page 1607: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleInthefollowingexamplefromtheEventsdevelopersampleform,theOnVersionUpgradeeventhandlerisusedtodeterminewhethertheformwiththeincorrectolderversionnumbercontainsanEmailAddresselement.Ifitdoesnot,oneisadded.

functionXDocument::OnVersionUpgrade(eventObj){if(!XDocument.DOM.selectSingleNode("/Customers/CustomerInfo/EmailAddress")){try{//Createthenewelement.varobjItemNode=XDocument.DOM.selectSingleNode("/Customers/CustomerInfo").ownerDocument.createElement("EmailAddress");

//Addthenew<item>elementtotheXMLdocumentasa//childofthe<order>element.XDocument.DOM.selectSingleNode("/Customers/CustomerInfo").appendChild(objItemNode);eventObj.ReturnStatus=true;}catch(ex){XDocument.UI.Alert("Therewasanerrorinsertingthe"+"<EmailAddress>node.\nDescription:"+ex.description);eventObj.ReturnStatus=false;}}}

Page 1608: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1609: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XdCertificateStatusEnumeration

TheXdCertificateStatusenumerationisusedtodeterminethestatusofadigitalcertificate.TheseenumeratedvaluesarereturnedbytheStatuspropertyoftheCertificateobject.

Name Value DescriptionxdCertificateStatusError 0 Thestatusofthespecifieddigital

certificatecannotbedetermined.xdCertificateStatusValid 1 Thespecifieddigitalcertificateis

valid.xdCertificateStatusExpired 2 Thespecifieddigitalcertificate

hasexpired.xdCertificateStatusNotTrusted 3 Thespecifieddigitalcertificateis

nottrusted.xdCertificateStatusRevoked 4 Thespecifieddigitalcertificate

hasbeenrevoked.

Page 1610: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XdConfirmButtonsEnumeration

TheXdConfirmButtonsenumerationisusedtodeterminethetypeofbuttonstobedisplayedinamessagebox.TheseenumeratedvaluesareusedbytheConfirmmethodoftheUIobject.

Name Value DescriptionxdOKCancel 1 OKandCancelbuttonsaredisplayed.xdYesNoCancel 3 Yes,No,andCancelbuttonsaredisplayed.xdYesNo 4 YesandNobuttonsaredisplayed

Page 1611: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XdConfirmChoiceEnumeration

TheXdConfirmChoiceenumerationisusedtodeterminewhichbuttonisclickedinamessagebox.TheseenumeratedvaluesareusedbytheConfirmmethodoftheUIobject.

Name Value DescriptionxdOK 1 TheOKbuttonwasclicked.xdCancel 2 TheCancelbuttonwasclicked.xdYes 6 TheYesbuttonwasclicked.xdNo 7 TheNobuttonwasclicked.

Page 1612: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1613: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XdDocumentVersionModeEnumeration

TheXdDocumentVersionModeenumerationisusedtodeterminehowaMicrosoftOfficeInfoPath2003formwillbeopened.TheseenumeratedvaluesareusedasargumentstotheNewandOpenmethodsoftheExternalApplicationobject.

Name Value DescriptionxdCanOpenInReadOnlyMode 8 Theformisopenedin

read-onlymode.xdCanTransformSigned 16 Theformisopenedandits

transformapplied,eventhoughithasadigitalsignature.

xdFailOnVersionMismatch 0 Theformiscreatedoropenedonlyifitisaccessibleanditsversionnumbermatchestheversionnumberoftheformtemplate.

xdFailOnVersionOlder 1 Theformiscreatedoropenedonlyifitisaccessibleanditsversionnumberisnotolderthantheversionnumberoftheformtemplate.

xdIgnoreDataAdaptersQueryFailure 64 Theformisopenedevenifthequeryassociatedwithitsdataadapterfailstoreturndata.

xdPromptTransformSigned 32 TheformisopenedandtheDigitalSignaturesdialogboxisdisplayedbeforetheform'stransformisapplied.

xdUseExistingVersion 2 Theformiscreatedoropenedusingtheexisting

Page 1614: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

versionnumberoftheformtemplate.

Page 1615: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XdMachineOnlineStateEnumeration

TheXdMachineOnlineStateenumerationisusedtodeterminethestateoftheconnectionfortheclientcomputer.TheseenumeratedvaluesarereturnedbytheMachineOnlineStatepropertyoftheApplicationobject.

Name Value DescriptionxdOffline 0 Theclientcomputerisnotconnectedtothe

network.xdOnline 1 Theclientcomputerisconnectedtothe

network.xdIEIsInOfflineMode 2 MicrosoftInternetExplorerisinoffline

mode.

Page 1616: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XdSignatureRelationEnumeration

TheXdSignatureRelationenumerationisusedtodeterminehowdigitalsignaturescanbeaddedtoaSignedDataBlockobject.Theseenumeratedvaluesareread-only.

Name Value DescriptionxdSignatureRelationCoSign 2 Specifiesthatsignaturesare

independentofeachotherintheSignedDataBlockobject.

xdSignatureRelationCounterSign 3 SpecifiesthateachsignaturesignstheprecedingsignatureintheSignedDataBlockobject.

xdSignatureRelationSingle 1 SpecifiesthatonlyonesignaturecanexistintheSignedDataBlockobject.

Page 1617: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1618: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XdSignatureStatusEnumeration

TheXdSignatureStatusenumerationisusedtodeterminethestatusofadigitalsignature.TheseenumeratedvaluesarereturnedbytheStatuspropertyoftheSignatureobject.

Name Value DescriptionxdSignatureStatusError 0 Thestatusofthespecified

digitalsignaturecannotbedetermined.

xdSignatureStatusValid 1 Thespecifieddigitalsignatureisvalid.

xdSignatureStatusInvalid 2 Thespecifieddigitalsignatureisinvalid.

xdSignatureStatusUnsupported 3 ThespecifieddigitalsignatureisnotsupportedbyMicrosoftOfficeInfoPath2003.

Page 1619: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1620: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XdTaskPaneTypeEnumeration

TheXdTaskPaneTypeenumerationisusedtodeterminethetypeofMicrosoftOfficeInfoPath2003taskpanethatiscurrentlydisplayed.TheseenumeratedvaluesarereturnedbytheTypepropertyoftheTaskPaneobject.ThesevaluesarealsousedasthepositionalargumenttotheItempropertyoftheTaskPanescollection.

Name Value DescriptionxdTaskPaneBulletsNumbering 9 TheBulletsandNumbering

taskpane.Usedforapplyingbulletandnumberingstylestoaform.

xdTaskPaneClipArt 5 TheClipArttaskpane.Usedforinsertingclipartintoaform.

xdTaskPaneDesignerNew 2 TheDesignaFormtaskpane.Usedtodesignanewform,openaformindesignmode,orselectaformtofillout.

xdTaskPaneFillOutAForm 1 TheFillOutaFormtaskpane.Usedtoopenaformtofilloutordesign.

xdTaskPaneFind 6 TheFindtaskpane.Usedtosearchfortextinaform.

xdTaskPaneFormatting 8 TheFonttaskpane.Usedtoformattext.

xdTaskPaneHelp 4 TheHelptaskpane.UsedtodisplaytheInfoPathHelpsystem.

xdTaskPaneHTML 0 TheInfoPathcustomtaskpane.Usedbyformdeveloperstoprovideextraformfunctionality.

xdTaskPaneHWSWorkflow 12 TheMicrosoftBizTalkServer2004HumanWorkflowServices(HWS)Workflowtaskpane.

Page 1621: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdTaskPaneParaFormatting 11 TheParagraphtaskpane.Usedtoconfigurepropertiesofparagraphsincludingalignmentandspacing.

xdTaskPaneReplace 7 TheReplacetaskpane.Usedtofindandreplacetextinaform.

xdTaskPaneSearchResults 3 TheSearchResultstaskpane.Usedtodisplaytheresultsofasearch.

xdTaskPaneSpelling 10 TheSpellingtaskpane.Usedtocheckthespellinginaform.

Page 1622: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XdWindowStateEnumeration

TheXdWindowStateenumerationisusedtodeterminethestateoftheMicrosoftOfficeInfoPath2003windowthatisrepresentedbytheWindowobject.TheseenumeratedvaluesarereturnedorsetbytheWindowStatepropertyoftheWindowobject.

Name Value DescriptionxdWindowStateMaximize 1 Thewindowismaximized.xdWindowStateNormal 2 Thewindowisnotmaximizedor

minimized.xdWindowStateMinimize 3 Thewindowisminimized.

Page 1623: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1624: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XdWindowTypeEnumeration

TheXdWindowTypeenumerationisusedtodeterminethetypeofMicrosoftOfficeInfoPath2003windowthatiscurrentlydisplayed.TheseenumeratedvaluesarereturnedbytheTypepropertyoftheWindowobject.

Name Value DescriptionxdDesignerWindow 1 Thecurrentwindowisthewindowthatis

displayedindesignmode.xdEditorWindow 0 Thecurrentwindowisthewindowthatis

displayedwhenfillingoutaform.

Page 1625: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

InfoPathXSFDiagram

<xDocumentClass>*<applicationParameters> *

<solutionProperties>*<calculations>*<calculatedField>(s)

*<customValidation>*<errorCondition>(s)<errorMessage>

*<dataAdapters>*<davAdapter>(s)<fileName><folderURL>

*<emailAdapter>(s)*<attachmentFileName>*<bcc>*<cc>*<intro>*<subject>*<to>

*<hwsAdapter>(s)*<hwsOperation>

*<input>*<partFragment>(s)

*<webServiceAdapter>(s)<operation>*<input>*<partFragment>(s)

*<dataObjects>

Legend

*OptionalElement

(s)RepeatingElement

Page 1626: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

*<dataObject>(s)<query>*<adoAdapter>*<webServiceAdapter><operation>*<input>*<partFragment>(s)

*<sharepointListAdapter>*<field>(s)

*<xmlFileAdapter>*<documentSchemas><documentSchema>(s)

*<documentSignatures>*<signedDataBlock>(s)*<message>(s)

*<documentVersionUpgrade> *<useScriptHandler>*<useTransform>

*<domEventHandlers>*<domEventHandler>(s)*<ruleSetAction>(s)

*<extensions>*<extension>(s)

*<externalViews>*<externalView>(s)*<mainpane>

*<featureRestrictions>*<autoRecovery>*<exportToExcel>

Page 1627: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

*<exportToWeb>*<print>*<save>*<sendMail>

*<fileNew><initialXMLDocument>*<customCategory>(s)

*<hwsWorkflow><allowedActions><action>(s)

<allowedTasks><task>(s)

<location>*<importParameters>*<importSource>(s)

*<listProperties>*<fields>*<field>(s)

*<onLoad><ruleSetAction>

<package><files>*<file>(s)*<fileProperties>*<property>(s)

*<permissions><allowedControl>(s)

*<query>*<adoAdapter>

Page 1628: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

*<queryAction>*<sharepointListAdapter>

*<field>(s)*<webServiceAdapter>

<operation>*<input>*<partFragment>(s)

*<xmlFileAdapter>*<roles><role>(s)<membership>(s)<getUserNameFromData>(s)<group>(s)<username>(s)

*<ruleSets>*<ruleSet>(s)<rule>(s)*<assignmentAction>(s)*<closeDocumentAction>(s)*<dialogBoxExpressionAction>(s)*<dialogBoxMessageAction>(s)*<exitRuleSet>(s)*<openNewDocumentAction>(s)*<queryAction>(s)*<submitAction>(s)*<switchViewAction>(s)

*<save>*<useScriptHandler>

*<schemaErrorMessages>

Page 1629: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

*<override>(s)<errorMessage>

*<scripts>*<script>(s)

*<submit>*<davAdapter><fileName><folderURL>

*<emailAdapter>*<attachmentFileName>*<bcc>*<cc>*<intro>*<subject>*<to>

*<errorMessage>*<ruleSetAction>*<submitAction>*<successMessage>*<useHttpHandler>*<useScriptHandler>*<useQueryAdapter>*<webServiceAdapter><operation>*<input>*<partFragment>(s)

<taskpane><views><view>(s)

Page 1630: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

*<editing>*<xmlToEdit>(s)*<editWith>(s)*<fragmentToInsert><chooseFragment>(s)*<attributeData>

*<masterDetail><mainpane>*<menu>(s)*<button>(s)*<menu>(s)

*<menuArea>(s)*<button>(s)*<menu>(s)

<printSettings>*<footer>*<header>

*<toolbar>(s)*<button>(s)*<menu>(s)

*<unboundControls>*<button>(s)*<ruleSetAction>

Page 1631: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1632: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

InfoPathXSFSchema

TheMicrosoftOfficeInfoPath2003formdefinition(.xsf)fileschemaisanXMLSchema(.xsd)filethatisusedtovalidatethe.xsffilecontainedinanInfoPathformtemplate.

Thefollowingisacompletelistingofthecontentsofthe.xsfschemafile:

<?xmlversion="1.0"encoding="UTF-8"?><xsd:schemaxmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition" targetNamespace="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"elementFormDefault="qualified" attributeFormDefault="unqualified"> <!--xdTitletype--> <xsd:simpleTypename="xdTitle"> <xsd:restrictionbase="xsd:string"> <xsd:minLengthvalue="1"/> <xsd:maxLengthvalue="255"/> <xsd:patternvalue="([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?"/> </xsd:restriction> </xsd:simpleType> <!--xdViewNametype--> <xsd:simpleTypename="xdViewName"> <xsd:restrictionbase="xsd:string"> <xsd:minLengthvalue="1"/> <xsd:maxLengthvalue="255"/> <xsd:patternvalue="([^\p{Z}\p{C}/\\#&amp;&quot;&gt;&lt;])(([^\p{Zl}\p{Zp}\p{C}/\\#&amp;&quot;&gt;&lt;])*([^\p{Z}\p{C}/\\#&amp;&quot;&gt;&lt;]))?"/> </xsd:restriction> </xsd:simpleType> <!--xdRoleNametype--> <!--usesxdViewNameasbase--> <xsd:simpleTypename="xdRoleName"> <xsd:restrictionbase="xsf:xdViewName"></xsd:restriction> </xsd:simpleType> <!--xdYesNotype-->

Page 1633: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:simpleTypename="xdYesNo"> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="yes"/> <xsd:enumerationvalue="no"/> </xsd:restriction> </xsd:simpleType> <!--xdEnabledDisabledtype--> <xsd:simpleTypename="xdEnabledDisabled"> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="enabled"/> <xsd:enumerationvalue="disabled"/> </xsd:restriction> </xsd:simpleType> <!--xdManualAutotype--> <xsd:simpleTypename="xdManualAuto"> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="manual"/> <xsd:enumerationvalue="automatic"/> </xsd:restriction> </xsd:simpleType> <!--xdExpressionLiteraltype--> <xsd:simpleTypename="xdExpressionLiteral"> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="expression"/> <xsd:enumerationvalue="literal"/> </xsd:restriction> </xsd:simpleType> <!--xdFileNametype--> <xsd:simpleTypename="xdFileName"> <xsd:restrictionbase="xsd:string"> <xsd:minLengthvalue="1"/> <xsd:maxLengthvalue="64"/> </xsd:restriction>

Page 1634: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:simpleType> <!--xdScriptLanguagetype--> <xsd:simpleTypename="xdScriptLanguage"> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:patternvalue="(([Jj][Aa][Vv][Aa]|(([Jj])|([Vv][Bb]))([Ss][Cc][Rr][Ii][Pp][Tt]))([.][Ee][Nn][Cc][Oo][Dd][Ee]))|([Jj][Aa][Vv][Aa]|(([Jj])|([Vv][Bb]))([Ss][Cc][Rr][Ii][Pp][Tt]))|([Mm][Aa][Nn][Aa][Gg][Ee][Dd][Cc][Oo][Dd][Ee])"/> </xsd:restriction> </xsd:simpleType> <!--xdSolutionVersiontype--> <xsd:simpleTypename="xdSolutionVersion"> <xsd:restrictionbase="xsd:string"> <xsd:patternvalue="(([0-9]{1,4}.){3}[0-9]{1,4})"/> </xsd:restriction> </xsd:simpleType> <!--xdEmptyStringtype--> <xsd:simpleTypename="xdEmptyString"> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="0"/> </xsd:restriction> </xsd:simpleType> <!--xdErrorMessagetype--> <xsd:simpleTypename="xdErrorMessage"> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="1023"/> </xsd:restriction> </xsd:simpleType> <!--xdDesignModetype--> <xsd:simpleTypename="xdDesignMode"> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="normal"/> <xsd:enumerationvalue="protected"/> </xsd:restriction> </xsd:simpleType> <!--xdTrustLeveltype-->

Page 1635: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:simpleTypename="xdTrustLevel"> <xsd:restrictionbase="xsd:string"> <xsd:enumerationvalue="restricted"/> <xsd:enumerationvalue="domain"/> </xsd:restriction> </xsd:simpleType> <!--xdSignedDataBlockNametype--> <xsd:simpleTypename="xdSignedDataBlockName"> <xsd:restrictionbase="xsd:ID"> <xsd:minLengthvalue="1"/> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> <!--xdSignedDataBlockMessagetype--> <xsd:simpleTypename="xdSignedDataBlockMessage"> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> <!--xdSignatureRelationEnumtype--> <xsd:simpleTypename="xdSignatureRelationEnum"> <xsd:restrictionbase="xsd:string"> <xsd:enumerationvalue="countersign"/> <xsd:enumerationvalue="cosign"/> <xsd:enumerationvalue="single"/> </xsd:restriction> </xsd:simpleType> <!--xdHWSnametype--> <xsd:simpleTypename="xdHWSname"> <xsd:restrictionbase="xsd:NCName"> <xsd:patternvalue="[^-^\.^\\^\[^\]^\|^\+^?^\*^@^\{^\}^\(^\)^&gt;^&lt;^=^;^,]*"/> </xsd:restriction> </xsd:simpleType>

Page 1636: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<!--xdHWSCaptiontype--> <xsd:simpleTypename="xdHWSCaption"> <xsd:restrictionbase="xsd:string"> <xsd:minLengthvalue="1"/> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> <!--xDocumentClass--> <xsd:elementname="xDocumentClass"> <xsd:complexType> <xsd:all> <xsd:elementref="xsf:package"minOccurs="1"/> <xsd:elementref="xsf:permissions"minOccurs="0"/> <xsd:elementref="xsf:views"minOccurs="1"/> <xsd:elementref="xsf:hwsWorkflow"minOccurs="0"/> <xsd:elementref="xsf:externalViews"minOccurs="0"/> <xsd:elementref="xsf:scripts"minOccurs="0"/> <xsd:elementref="xsf:schemaErrorMessages"minOccurs="0"/> <xsd:elementref="xsf:documentSchemas"minOccurs="0"/> <xsd:elementref="xsf:applicationParameters"minOccurs="0"/> <xsd:elementref="xsf:featureRestrictions"minOccurs="0"/> <xsd:elementref="xsf:fileNew"minOccurs="0"/> <xsd:elementref="xsf:customValidation"minOccurs="0"/> <xsd:elementref="xsf:domEventHandlers"minOccurs="0"/> <xsd:elementref="xsf:importParameters"minOccurs="0"/> <xsd:elementref="xsf:listProperties"minOccurs="0"/> <xsd:elementref="xsf:taskpane"minOccurs="0"/> <xsd:elementref="xsf:documentSignatures"minOccurs="0"/> <xsd:elementref="xsf:dataObjects"minOccurs="0"/> <xsd:elementref="xsf:dataAdapters"minOccurs="0"/> <xsd:elementref="xsf:query"minOccurs="0"/> <xsd:elementref="xsf:submit"minOccurs="0"/> <xsd:elementref="xsf:save"minOccurs="0"/>

Page 1637: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:elementref="xsf:roles"minOccurs="0"/> <xsd:elementref="xsf:onLoad"minOccurs="0"/> <xsd:elementref="xsf:documentVersionUpgrade"minOccurs="0"/> <xsd:elementref="xsf:extensions"minOccurs="0"/> <xsd:elementref="xsf:ruleSets"minOccurs="0"/> <xsd:elementref="xsf:calculations"minOccurs="0"/> </xsd:all> <xsd:attributename="name"type="xsd:string"use="optional"/> <xsd:attributename="author"type="xsd:string"use="optional"/> <xsd:attributename="description"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="solutionVersion"type="xsf:xdSolutionVersion"use="optional"/> <xsd:attributename="productVersion"type="xsd:string"use="optional"/> <xsd:attributename="solutionFormatVersion"type="xsf:xdSolutionVersion"use="required"/> <xsd:attributename="dataFormSolution"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="requireFullTrust"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="trustLevel"type="xsf:xdTrustLevel"use="optional"/> <xsd:attributename="trustSetting"type="xsf:xdManualAuto"use="optional"/> <xsd:attributename="publishUrl"type="xsd:string"use="optional"/> </xsd:complexType> <xsd:keyname="view_name_key"> <xsd:selectorxpath="./xsf:views/xsf:view"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:keyname="externalView_name_key"> <xsd:selectorxpath="./xsf:externalViews/xsf:externalView"/> <xsd:fieldxpath="@name"/> </xsd:key>

Page 1638: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:keyname="view_or_externalView_name_key"> <xsd:selectorxpath="./xsf:views/xsf:view|./xsf:externalViews/xsf:externalView"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:keyname="ruleset_name_key"> <xsd:selectorxpath="./xsf:ruleSets/xsf:ruleSet"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:keyname="dataObject_name_key"> <xsd:selectorxpath="./xsf:dataObjects/xsf:dataObject"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:uniquename="adapter_name_unique"> <xsd:selectorxpath="./xsf:dataObjects/xsf:dataObject/xsf:query/*|./xsf:query/*|./xsf:dataAdapters/*|./xsf:submit/xsf:webServiceAdapter|./xsf:submit/xsf:davAdapter|./xsf:submit/xsf:emailAdapter"/> <xsd:fieldxpath="@name"/> </xsd:unique> <xsd:keyname="adapter_name_key"> <xsd:selectorxpath="./xsf:dataAdapters/*"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:uniquename="view_external_name_unique"> <xsd:selectorxpath="./xsf:views/xsf:view|./xsf:externalViews/xsf:externalView"/> <xsd:fieldxpath="@name"/> </xsd:unique> </xsd:element> <!--schemaErrorMessages--> <xsd:elementname="schemaErrorMessages"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:override"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element>

Page 1639: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<!--override--> <xsd:elementname="override"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:errorMessage"/> </xsd:sequence> <xsd:attributename="match"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <!--applicationParameters--> <xsd:elementname="applicationParameters"> <xsd:complexType> <xsd:all> <xsd:elementref="xsf:solutionProperties"minOccurs="0"/> </xsd:all> <xsd:attributename="application"use="required"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:enumerationvalue="InfoPathDesignMode"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> <!--solutionProperties--> <xsd:elementname="solutionProperties"> <xsd:complexType> <xsd:attributename="allowCustomization"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="lastOpenView"use="optional"/> <xsd:attributename="scriptLanguage"type="xsf:xdScriptLanguage"use="optional"/> <xsd:attributename="automaticallyCreateNodes"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="lastVersionNeedingTransform"type="xsf:xdSolutionVersion"use="optional"/> <xsd:attributename="fullyEditableNamespace"type="xsd:anyURI"use="optional"/>

Page 1640: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:attributename="publishSaveUrl"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <!--featureRestrictions--> <xsd:elementname="featureRestrictions"> <xsd:complexType> <xsd:all> <xsd:elementname="save"minOccurs="0"> <xsd:complexType> <xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementref="xsf:exportToWeb"minOccurs="0"/> <xsd:elementref="xsf:exportToExcel"minOccurs="0"/> <xsd:elementref="xsf:print"minOccurs="0"/> <xsd:elementref="xsf:sendMail"minOccurs="0"/> <xsd:elementref="xsf:autoRecovery"minOccurs="0"/> </xsd:all> </xsd:complexType> </xsd:element> <!--exportToWeb--> <xsd:elementname="exportToWeb"> <xsd:complexType> <xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"/> </xsd:complexType> </xsd:element> <!--exportToExcel--> <xsd:elementname="exportToExcel"> <xsd:complexType> <xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"/> </xsd:complexType> </xsd:element> <!--print-->

Page 1641: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:elementname="print"> <xsd:complexType> <xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"/> </xsd:complexType> </xsd:element> <!--sendMail--> <xsd:elementname="sendMail"> <xsd:complexType> <xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"/> </xsd:complexType> </xsd:element> <!--autoRecovery--> <xsd:elementname="autoRecovery"> <xsd:complexType> <xsd:attributename="feature"type="xsf:xdEnabledDisabled"use="required"/> </xsd:complexType> </xsd:element> <!--query--> <xsd:elementname="query"> <xsd:complexType> <xsd:choice> <xsd:elementref="xsf:queryAction"/> <xsd:elementref="xsf:adoAdapter"/> <xsd:elementref="xsf:webServiceAdapter"/> <xsd:elementref="xsf:xmlFileAdapter"/> <xsd:elementref="xsf:sharepointListAdapter"/> </xsd:choice> </xsd:complexType> </xsd:element> <!--scripts--> <xsd:elementname="scripts"> <xsd:complexType> <xsd:sequence>

Page 1642: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:elementref="xsf:script"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="language"type="xsf:xdScriptLanguage"use="required"/> <xsd:attributename="enforceScriptTimeout"type="xsf:xdYesNo"use="optional"default="yes"/> </xsd:complexType> </xsd:element> <xsd:elementname="script"> <xsd:complexType> <xsd:attributename="src"type="xsf:xdFileName"use="required"/> </xsd:complexType> </xsd:element> <!--dataObjects--> <xsd:elementname="dataObjects"> <xsd:complexType> <xsd:choiceminOccurs="0"maxOccurs="unbounded"> <xsd:elementref="xsf:dataObject"/> </xsd:choice> </xsd:complexType> <xsd:uniquename="dataObjects_name_unique"> <xsd:selectorxpath="./xsf:dataObject"/> <xsd:fieldxpath="@name"/> </xsd:unique> </xsd:element> <xsd:elementname="dataObject"> <xsd:complexType> <xsd:choice> <xsd:elementname="query"> <xsd:complexType> <xsd:choice> <xsd:elementref="xsf:adoAdapter"/> <xsd:elementref="xsf:webServiceAdapter"/> <xsd:elementref="xsf:xmlFileAdapter"/> <xsd:elementref="xsf:sharepointListAdapter"/>

Page 1643: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:choice> </xsd:complexType> </xsd:element> </xsd:choice> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> <xsd:attributename="schema"type="xsd:string"use="optional"/> <xsd:attributename="initOnLoad"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <!--dataAdapters--> <xsd:elementname="adoAdapter"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdTitle"use="optional"/> <xsd:attributename="connectionString"type="xsd:string"use="required"/> <xsd:attributename="commandText"type="xsd:string"use="required"/> <xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="webServiceAdapter"> <xsd:complexType> <xsd:choice> <xsd:elementref="xsf:operation"/> </xsd:choice> <xsd:attributename="name"type="xsf:xdTitle"use="optional"/> <xsd:attributename="wsdlUrl"type="xsd:string"use="required"/> <xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="useDataSet"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="hwsAdapter"> <xsd:complexType>

Page 1644: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:choice> <xsd:elementref="xsf:hwsOperation"/> </xsd:choice> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> <xsd:attributename="wsdlUrl"type="xsd:string"use="required"/> <xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="operation"> <xsd:complexType> <xsd:choice> <xsd:elementref="xsf:input"minOccurs="0"/> </xsd:choice> <xsd:attributename="name"type="xsd:string"use="required"/> <xsd:attributename="soapAction"type="xsd:string"use="required"/> <xsd:attributename="serviceUrl"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="hwsOperation"> <xsd:complexType> <xsd:choice> <xsd:elementref="xsf:input"/> </xsd:choice> <xsd:attributename="type"type="xsd:string"use="required"/> <xsd:attributename="typeID"type="xsd:string"use="required"/> <xsd:attributename="serviceUrl"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="input"> <xsd:complexType> <xsd:choiceminOccurs="0"maxOccurs="unbounded"> <xsd:elementref="xsf:partFragment"/>

Page 1645: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:choice> <xsd:attributename="source"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="partFragment"> <xsd:complexType> <xsd:attributename="match"type="xsd:string"use="required"/> <xsd:attributename="replaceWith"type="xsd:string"use="required"/> <xsd:attributename="sendAsString"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="dataObject"type="xsd:string"use="optional"/> <xsd:attributename="filter"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="xmlFileAdapter"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdTitle"use="optional"/> <xsd:attributename="fileUrl"type="xsd:anyURI"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="sharepointListAdapter"> <xsd:complexType> <xsd:sequence> <xsd:elementname="field"minOccurs="0"maxOccurs="unbounded"> <xsd:complexType> <xsd:attributename="sharepointName"type="xsd:string"use="required"/> <xsd:attributename="infopathName"type="xsd:string"use="required"/> <xsd:attributename="isLookup"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> </xsd:sequence> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> <xsd:attributename="siteUrl"type="xsd:string"use="required"/> <xsd:attributename="sharepointGuid"type="xsd:string"use="required"/>

Page 1646: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:attributename="infopathGroup"type="xsd:string"use="required"/> <xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="davAdapter"> <xsd:complexType> <xsd:all> <xsd:elementname="folderURL"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="fileName"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"/> </xsd:complexType> </xsd:element> </xsd:all> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> <xsd:attributename="overwriteAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="emailAdapter"> <xsd:complexType> <xsd:all> <xsd:elementname="to"minOccurs="0"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"/>

Page 1647: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:complexType> </xsd:element> <xsd:elementname="cc"minOccurs="0"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="bcc"minOccurs="0"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="subject"minOccurs="0"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="intro"minOccurs="0"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="attachmentFileName"minOccurs="0"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"/> </xsd:complexType> </xsd:element> </xsd:all> <xsd:attributename="name"type="xsf:xdTitle"use="required"/>

Page 1648: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="dataAdapters"> <xsd:complexType> <xsd:choiceminOccurs="0"maxOccurs="unbounded"> <xsd:elementref="xsf:adoAdapter"/> <xsd:elementref="xsf:webServiceAdapter"/> <xsd:elementref="xsf:xmlFileAdapter"/> <xsd:elementref="xsf:sharepointListAdapter"/> <xsd:elementref="xsf:davAdapter"/> <xsd:elementref="xsf:emailAdapter"/> <xsd:elementref="xsf:hwsAdapter"/> </xsd:choice> </xsd:complexType> </xsd:element> <!--documentSchemas--> <xsd:elementname="documentSchemas"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:documentSchema"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="documentSchema"> <xsd:complexType> <xsd:attributename="location"type="xsd:string"use="required"/> <xsd:attributename="rootSchema"type="xsf:xdYesNo"/> </xsd:complexType> </xsd:element> <!--customValidation--> <xsd:elementname="customValidation">

Page 1649: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:errorCondition"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="errorCondition"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:errorMessage"/> </xsd:sequence> <xsd:attributename="match"type="xsd:string"use="required"/> <xsd:attributename="expression"type="xsd:string"use="required"/> <xsd:attributename="expressionContext"type="xsd:string"use="optional"/> <xsd:attributename="showErrorOn"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="errorMessage"> <xsd:complexType> <xsd:simpleContent> <xsd:extensionbase="xsf:xdErrorMessage"> <xsd:attributename="type"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="modal"/> <xsd:enumerationvalue="modeless"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="shortMessage"use="required"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="127"/>

Page 1650: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:extension> </xsd:simpleContent> </xsd:complexType> </xsd:element> <!--domEventHandlers--> <xsd:elementname="domEventHandlers"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:domEventHandler"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:uniquename="domEventHandler_handlerObject_unique"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@handlerObject"/> </xsd:unique> </xsd:element> <xsd:elementname="domEventHandler"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:ruleSetAction"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="dataObject"type="xsd:string"use="optional"/> <xsd:attributename="match"type="xsd:string"use="required"/> <xsd:attributename="handlerObject"type="xsd:string"use="optional"/> </xsd:complexType> <xsd:keyrefname="domEventHandler_ruleSetAction"refer="xsf:ruleset_name_key"> <xsd:selectorxpath="./xsf:ruleSetAction"/> <xsd:fieldxpath="@ruleSet"/> </xsd:keyref> </xsd:element>

Page 1651: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<!--importParameters--> <xsd:elementname="importParameters"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:importSource"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="enabled"type="xsf:xdYesNo"use="required"/> <xsd:attributename="useScriptHandler"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="importSource"> <xsd:complexType> <xsd:attributename="name"type="xsd:string"use="required"/> <xsd:attributename="schema"type="xsf:xdFileName"use="required"/> <xsd:attributename="transform"type="xsf:xdFileName"use="required"/> <xsd:attributename="authoringOfTransform"type="xsf:xdManualAuto"use="optional"/> </xsd:complexType> </xsd:element> <!--listProperties--> <xsd:elementname="listProperties"> <xsd:complexType> <xsd:all> <xsd:elementref="xsf:fields"/> </xsd:all> </xsd:complexType> </xsd:element> <xsd:elementname="fields"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:field"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element>

Page 1652: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:elementname="field"> <xsd:complexType> <xsd:attributename="type"type="xsd:NMTOKEN"use="required"/> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> <xsd:attributename="columnName"type="xsf:xdTitle"use="required"/> <xsd:attributename="required"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="viewable"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="node"type="xsd:string"use="required"/> <xsd:attributename="maxLength"type="xsd:byte"/> <xsd:attributename="aggregation"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="sum"/> <xsd:enumerationvalue="count"/> <xsd:enumerationvalue="average"/> <xsd:enumerationvalue="min"/> <xsd:enumerationvalue="max"/> <xsd:enumerationvalue="first"/> <xsd:enumerationvalue="last"/> <xsd:enumerationvalue="merge"/> <xsd:enumerationvalue="plaintext"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> <!--submit--> <xsd:elementname="submit"> <xsd:complexType> <xsd:all> <xsd:elementname="submitAction"minOccurs="0"> <xsd:complexType> <xsd:attributename="adapter"type="xsf:xdTitle"use="required"/>

Page 1653: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:complexType> <xsd:keyrefname="submitAdapter_name_keyref"refer="xsf:adapter_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@adapter"/> </xsd:keyref> </xsd:element> <xsd:elementref="xsf:useHttpHandler"minOccurs="0"/> <xsd:elementref="xsf:useScriptHandler"minOccurs="0"/> <xsd:elementref="xsf:ruleSetAction"minOccurs="0"/> <xsd:elementref="xsf:useQueryAdapter"minOccurs="0"/> <xsd:elementref="xsf:webServiceAdapter"minOccurs="0"/> <xsd:elementref="xsf:davAdapter"minOccurs="0"/> <xsd:elementref="xsf:emailAdapter"minOccurs="0"/> <xsd:elementname="successMessage"type="xsd:string"minOccurs="0"/> <xsd:elementname="errorMessage"type="xsd:string"minOccurs="0"/> </xsd:all> <xsd:attributename="caption"type="xsd:string"use="optional"/> <xsd:attributename="onAfterSubmit"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="close"/> <xsd:enumerationvalue="keepOpen"/> <xsd:enumerationvalue="openNew"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="showStatusDialog"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="showSignatureReminder"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="disableMenuItem"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> <xsd:keyrefname="submit_ruleSetAction"refer="xsf:ruleset_name_key"> <xsd:selectorxpath="./xsf:ruleSetAction"/> <xsd:fieldxpath="@ruleSet"/>

Page 1654: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:keyref> </xsd:element> <xsd:elementname="useHttpHandler"> <xsd:complexType> <xsd:attributename="method"use="required"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="POST"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="href"type="xsd:anyURI"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="useScriptHandler"/> <xsd:elementname="useQueryAdapter"/> <!--onLoad--> <xsd:elementname="onLoad"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:ruleSetAction"minOccurs="1"maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:keyrefname="load_ruleSetAction"refer="xsf:ruleset_name_key"> <xsd:selectorxpath="./xsf:ruleSetAction"/> <xsd:fieldxpath="@ruleSet"/> </xsd:keyref> </xsd:element> <!--save--> <xsd:elementname="save"> <xsd:complexType> <xsd:choiceminOccurs="0"maxOccurs="1"> <xsd:elementref="xsf:useScriptHandler"/>

Page 1655: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:choice> </xsd:complexType> </xsd:element> <!--roles--> <xsd:elementname="roles"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:role"minOccurs="1"maxOccurs="unbounded"/> <xsd:elementref="xsf:membership"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="default"type="xsd:string"use="required"/> <xsd:attributename="initiator"type="xsd:string"use="optional"/> <xsd:attributename="hideStatusBarDisplay"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> <!--rolenamesmustbeunique--> <xsd:uniquename="roles_name_unique"> <xsd:selectorxpath="./xsf:role"/> <xsd:fieldxpath="@name"/> </xsd:unique> <!--fieldsmustreferenceexistingrole--> <xsd:keyname="role_name_key"> <xsd:selectorxpath="./xsf:role"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:keyrefname="role_default"refer="xsf:role_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@default"/> </xsd:keyref> <xsd:keyrefname="role_initiator"refer="xsf:role_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@initiator"/> </xsd:keyref> <xsd:keyrefname="role_membership"refer="xsf:role_name_key">

Page 1656: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:selectorxpath="./xsf:membership/*"/> <xsd:fieldxpath="@memberOf"/> </xsd:keyref> </xsd:element> <xsd:elementname="role"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdRoleName"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="membership"> <xsd:complexType> <xsd:choiceminOccurs="1"maxOccurs="unbounded"> <xsd:elementref="xsf:getUserNameFromData"/> <xsd:elementref="xsf:userName"/> <xsd:elementref="xsf:group"/> </xsd:choice> </xsd:complexType> </xsd:element> <xsd:elementname="getUserNameFromData"> <xsd:complexType> <xsd:attributename="dataObject"type="xsd:string"use="optional"/> <xsd:attributename="select"type="xsd:string"use="required"/> <xsd:attributename="memberOf"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="userName"> <xsd:complexType> <xsd:attributename="name"type="xsd:string"use="required"/> <xsd:attributename="memberOf"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="group"> <xsd:complexType>

Page 1657: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:attributename="name"type="xsd:string"use="required"/> <xsd:attributename="memberOf"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <!--hwsWorkflow--> <xsd:elementname="hwsWorkflow"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:location"minOccurs="1"maxOccurs="1"/> <xsd:elementref="xsf:allowedActions"minOccurs="1"maxOccurs="1"/> <xsd:elementref="xsf:allowedTasks"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="taskpaneVisible"type="xsf:xdYesNo"/> </xsd:complexType> <xsd:uniquename="hws_actiontask_name"> <xsd:selectorxpath="./xsf:allowedActions/xsf:action|./xsf:allowedTasks/xsf:task"/> <xsd:fieldxpath="@name"/> </xsd:unique> </xsd:element> <!--location--> <xsd:elementname="location"> <xsd:complexType> <xsd:attributename="url"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <!--allowedActions--> <xsd:elementname="allowedActions"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:action"minOccurs="1"maxOccurs="20"/> </xsd:sequence> </xsd:complexType> <xsd:uniquename="hws_actionTypeID_unique">

Page 1658: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:selectorxpath="./xsf:action"/> <xsd:fieldxpath="@actionTypeID"/> </xsd:unique> </xsd:element> <!--action--> <xsd:elementname="action"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdHWSname"use="required"/> <xsd:attributename="actionTypeID"type="xsd:string"use="required"/> <xsd:attributename="canInitiateWorkflow"type="xsf:xdYesNo"use="required"/> <xsd:attributename="caption"type="xsf:xdHWSCaption"use="optional"/> </xsd:complexType> </xsd:element> <!--allowedTasks--> <xsd:elementname="allowedTasks"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:task"minOccurs="1"maxOccurs="20"/> </xsd:sequence> </xsd:complexType> <xsd:uniquename="hws_taskID_unique"> <xsd:selectorxpath="./xsf:task"/> <xsd:fieldxpath="@taskTypeID"/> </xsd:unique> </xsd:element> <!--task--> <xsd:elementname="task"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdHWSname"use="required"/> <xsd:attributename="taskTypeID"type="xsd:string"use="required"/> <xsd:attributename="caption"type="xsf:xdHWSCaption"use="optional"/> </xsd:complexType> </xsd:element>

Page 1659: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<!--fileNew--> <xsd:elementname="fileNew"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:initialXmlDocument"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="initialXmlDocument"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:customCategory"minOccurs="0"/> </xsd:sequence> <xsd:attributename="caption"type="xsf:xdTitle"use="required"/> <xsd:attributename="href"type="xsf:xdFileName"use="required"/> </xsd:complexType> </xsd:element> <!--customCategory--> <xsd:elementname="customCategory"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> </xsd:complexType> </xsd:element> <!--package--> <xsd:elementname="package"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:files"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="files"> <xsd:complexType>

Page 1660: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:sequence> <xsd:elementref="xsf:file"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="file"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:fileProperties"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="name"type="xsf:xdFileName"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="fileProperties"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:property"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="property"> <xsd:complexType> <xsd:attributename="name"type="xsd:string"use="required"/> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="type"type="xsd:QName"use="required"/> </xsd:complexType> </xsd:element> <!--permissions--> <xsd:elementname="permissions"> <xsd:complexType> <xsd:choiceminOccurs="0"maxOccurs="unbounded"> <xsd:elementref="xsf:allowedControl"/> </xsd:choice>

Page 1661: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:complexType> </xsd:element> <xsd:elementname="allowedControl"> <xsd:complexType> <xsd:attributename="cabFile"type="xsd:string"use="optional"/> <xsd:attributename="clsid"type="xsd:string"use="required"/> <xsd:attributename="version"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <!--ViewandContext-DrivenEditingdefinitions--> <!--ExternalViews--> <xsd:elementname="externalViews"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:externalView"minOccurs="1"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="default"type="xsd:string"/> </xsd:complexType> <xsd:uniquename="externalViews_name_unique"> <xsd:selectorxpath="./xsf:externalView"/> <xsd:fieldxpath="@default"/> </xsd:unique> <xsd:keyrefname="external_views_printView"refer="xsf:externalView_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@default"/> </xsd:keyref> </xsd:element> <xsd:elementname="externalView"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:mainpane"/> </xsd:sequence> <xsd:attributename="target"type="xsd:string"/>

Page 1662: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:attributename="name"type="xsf:xdViewName"use="required"/> <xsd:attributename="designMode"type="xsf:xdDesignMode"/> </xsd:complexType> </xsd:element> <!--attributeData--> <xsd:elementname="attributeData"> <xsd:complexType> <xsd:attributename="attribute"type="xsd:string"use="required"/> <xsd:attributename="value"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <!--button--> <xsd:elementname="button"> <xsd:complexType> <xsd:attributename="caption"type="xsf:xdTitle"/> <xsd:attributename="icon"type="xsd:string"/> <xsd:attributename="tooltip"type="xsf:xdTitle"/> <xsd:attributename="name"type="xsd:NMTOKEN"/> <xsd:attributename="xmlToEdit"type="xsd:NMTOKEN"/> <xsd:attributename="action"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="xCollection::insert"/> <xsd:enumerationvalue="xCollection::insertBefore"/> <xsd:enumerationvalue="xCollection::insertAfter"/> <xsd:enumerationvalue="xCollection::remove"/> <xsd:enumerationvalue="xCollection::refreshFilter"/> <xsd:enumerationvalue="xCollection::removeAll"/> <xsd:enumerationvalue="xOptional::insert"/> <xsd:enumerationvalue="xOptional::remove"/> <xsd:enumerationvalue="xReplace::replace"/> <xsd:enumerationvalue="xFileAttachment::attach"/> <xsd:enumerationvalue="xFileAttachment::open"/>

Page 1663: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:enumerationvalue="xFileAttachment::saveAs"/> <xsd:enumerationvalue="xFileAttachment::remove"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="showIf"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="always"/> <xsd:enumerationvalue="enabled"/> <xsd:enumerationvalue="immediate"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> <!--chooseFragment--> <xsd:elementname="chooseFragment"> <xsd:complexTypemixed="true"> <xsd:sequence> <xsd:anyminOccurs="0"maxOccurs="unbounded"processContents="skip"/> </xsd:sequence> <xsd:attributename="parent"type="xsd:string"/> <xsd:attributename="followingSiblings"type="xsd:string"use="optional"/> <xsd:attributename="innerFragment"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <!--editWith--> <xsd:elementname="editWith"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:masterDetail"minOccurs="0"maxOccurs="1"/> <xsd:elementref="xsf:fragmentToInsert"minOccurs="0"maxOccurs="1"/>

Page 1664: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:sequence> <xsd:attributename="component"use="required"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="xCollection"/> <xsd:enumerationvalue="xOptional"/> <xsd:enumerationvalue="xReplace"/> <xsd:enumerationvalue="xTextList"/> <xsd:enumerationvalue="xField"/> <xsd:enumerationvalue="xImage"/> <xsd:enumerationvalue="xFileAttachment"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="caption"type="xsf:xdTitle"use="optional"/> <xsd:attributename="autoComplete"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="proofing"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="type"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="plain"/> <xsd:enumerationvalue="formatted"/> <xsd:enumerationvalue="plainMultiline"/> <xsd:enumerationvalue="formattedMultiline"/> <xsd:enumerationvalue="rich"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="useFilter"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:enumerationvalue="yes"/> <xsd:enumerationvalue="no"/>

Page 1665: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="widgetIcon"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:enumerationvalue="standard"/> <xsd:enumerationvalue="filter"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="filterDependency"type="xsd:string"use="optional"/> <xsd:attributename="field"type="xsd:string"use="optional"/> <xsd:attributename="removeAncestors"type="xsd:nonNegativeInteger"use="optional"/> <xsd:attributename="maxLength"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:integer"> <xsd:minInclusivevalue="-1"/> <xsd:maxInclusivevalue="9999"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="allowedFileTypes"type="xsd:string"use="optional"/> <xsd:anyAttributenamespace="http://schemas.microsoft.com/office/infopath/2003"processContents="skip"/> </xsd:complexType> </xsd:element> <!--unboundControls--> <xsd:elementname="unboundControls"> <xsd:complexType> <xsd:sequence> <!--button--> <xsd:elementname="button"minOccurs="0"maxOccurs="unbounded"> <xsd:complexType>

Page 1666: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:sequence> <xsd:elementref="xsf:ruleSetAction"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="name"use="required"> <xsd:simpleType> <!--typeofnameisnonqualifiedname,butNCNamealsoaccepts'.'and'-', sothesecharactersare disabledbypatternrestriction--> <xsd:restrictionbase="xsd:NCName"> <xsd:patternvalue="[^\.\^-]*"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> <xsd:keyrefname="button_ruleSetAction"refer="xsf:ruleset_name_key"> <xsd:selectorxpath="./xsf:ruleSetAction"/> <xsd:fieldxpath="@ruleSet"/> </xsd:keyref> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <!--editing--> <xsd:elementname="editing"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:xmlToEdit"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <!--MasterDetail--> <xsd:elementname="masterDetail"> <xsd:complexType> <xsd:attributename="master"type="xsd:string"/>

Page 1667: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:attributename="masterViewContext"type="xsd:string"/> <xsd:attributename="masterKey"type="xsd:string"/> <xsd:attributename="detailKey"type="xsd:string"/> </xsd:complexType> </xsd:element> <!--fragmentToInsert--> <xsd:elementname="fragmentToInsert"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:chooseFragment"minOccurs="1"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <!--mainpane--> <xsd:elementname="mainpane"> <xsd:complexType> <xsd:attributename="transform"type="xsf:xdFileName"use="required"/> </xsd:complexType> </xsd:element> <!--printSettings--> <xsd:elementname="printSettings"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:header"minOccurs="0"maxOccurs="1"/> <xsd:elementref="xsf:footer"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="orientation"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="portrait"/> <xsd:enumerationvalue="landscape"/> </xsd:restriction> </xsd:simpleType>

Page 1668: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:attribute> <xsd:attributename="header"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="footer"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="marginUnitsType"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="in"/> <xsd:enumerationvalue="cm"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="rightMargin"> <xsd:simpleType> <xsd:restrictionbase="xsd:float"> <xsd:minInclusivevalue="0"/> <xsd:maxInclusivevalue="100"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="leftMargin"> <xsd:simpleType>

Page 1669: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:restrictionbase="xsd:float"> <xsd:minInclusivevalue="0"/> <xsd:maxInclusivevalue="100"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="topMargin"> <xsd:simpleType> <xsd:restrictionbase="xsd:float"> <xsd:minInclusivevalue="0"/> <xsd:maxInclusivevalue="100"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="bottomMargin"> <xsd:simpleType> <xsd:restrictionbase="xsd:float"> <xsd:minInclusivevalue="0"/> <xsd:maxInclusivevalue="100"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="printerName"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="paperSize"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/>

Page 1670: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="paperSource"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="copies"> <xsd:simpleType> <xsd:restrictionbase="xsd:integer"> <xsd:minInclusivevalue="1"/> <xsd:maxInclusivevalue="9999"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="collate"type="xsf:xdYesNo"/> <xsd:attributename="pageRangeStart"> <xsd:simpleType> <xsd:restrictionbase="xsd:integer"> <xsd:minInclusivevalue="1"/> <xsd:maxInclusivevalue="32000"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="pageRangeEnd"> <xsd:simpleType> <xsd:restrictionbase="xsd:integer"> <xsd:minInclusivevalue="1"/> <xsd:maxInclusivevalue="32000"/> </xsd:restriction>

Page 1671: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:simpleType> </xsd:attribute> <xsd:attributename="printerSpecificSettings"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> <xsd:elementname="header"> <xsd:complexTypemixed="true"> <xsd:sequence> <xsd:anyminOccurs="0"maxOccurs="unbounded"processContents="skip"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="footer"> <xsd:complexTypemixed="true"> <xsd:sequence> <xsd:anyminOccurs="0"maxOccurs="unbounded"processContents="skip"/> </xsd:sequence> </xsd:complexType> </xsd:element> <!--toolbar--> <xsd:elementname="toolbar"> <xsd:complexType> <xsd:sequence> <xsd:groupref="xsf:UIItem"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> <xsd:attributename="caption"type="xsf:xdTitle"use="required"/>

Page 1672: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:complexType> </xsd:element> <!--menu--> <xsd:elementname="menu"> <xsd:complexType> <xsd:sequence> <xsd:groupref="xsf:UIItem"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="caption"type="xsf:xdTitle"use="required"/> </xsd:complexType> </xsd:element> <!--menuArea--> <xsd:elementname="menuArea"> <xsd:complexType> <xsd:sequence> <xsd:groupref="xsf:UIItem"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="name"use="required"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="msoFileMenu"/> <xsd:enumerationvalue="msoEditMenu"/> <xsd:enumerationvalue="msoInsertMenu"/> <xsd:enumerationvalue="msoViewMenu"/> <xsd:enumerationvalue="msoFormatMenu"/> <xsd:enumerationvalue="msoToolsMenu"/> <xsd:enumerationvalue="msoTableMenu"/> <xsd:enumerationvalue="msoHelpMenu"/> <xsd:enumerationvalue="msoStructuralEditingContextMenu"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType>

Page 1673: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:element> <!--UIContainer--> <xsd:groupname="UIContainer"> <xsd:choice> <xsd:elementref="xsf:toolbar"/> <xsd:elementref="xsf:menu"/> <xsd:elementref="xsf:menuArea"/> </xsd:choice> </xsd:group> <!--UIItem--> <xsd:groupname="UIItem"> <xsd:choice> <xsd:elementref="xsf:button"/> <xsd:elementref="xsf:menu"/> </xsd:choice> </xsd:group> <!--taskpane--> <xsd:elementname="taskpane"> <xsd:complexType> <xsd:attributename="caption"type="xsd:string"use="required"/> <xsd:attributename="href"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <!--views--> <xsd:elementname="views"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:view"minOccurs="1"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="default"type="xsd:string"/> </xsd:complexType> <xsd:uniquename="views_name_unique"> <xsd:selectorxpath="./xsf:view"/>

Page 1674: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:fieldxpath="@name"/> </xsd:unique> <xsd:keyrefname="view_printView"refer="xsf:view_or_externalView_name_key"> <xsd:selectorxpath="./xsf:view"/> <xsd:fieldxpath="@printView"/> </xsd:keyref> <xsd:keyrefname="views_default"refer="xsf:view_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@default"/> </xsd:keyref> </xsd:element> <!--ViewContent--> <xsd:groupname="ViewContent"> <xsd:choice> <xsd:elementref="xsf:editing"minOccurs="0"/> <xsd:elementref="xsf:mainpane"minOccurs="0"/> <xsd:elementref="xsf:printSettings"minOccurs="0"/> <xsd:groupref="xsf:UIContainer"minOccurs="0"maxOccurs="unbounded"/> <xsd:elementref="xsf:unboundControls"minOccurs="0"/> </xsd:choice> </xsd:group> <!--view--> <xsd:elementname="view"> <xsd:complexType> <xsd:groupref="xsf:ViewContent"minOccurs="0"maxOccurs="unbounded"/> <xsd:attributename="caption"type="xsf:xdViewName"/> <xsd:attributename="name"type="xsf:xdViewName"use="required"/> <xsd:attributename="showMenuItem"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="printView"type="xsd:string"/> <xsd:attributename="designMode"type="xsf:xdDesignMode"/> </xsd:complexType> <xsd:uniquename="toolbar_name_unique"> <xsd:selectorxpath="./xsf:toolbar"/>

Page 1675: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:fieldxpath="@name"/> </xsd:unique> <xsd:uniquename="menuArea_name_unique"> <xsd:selectorxpath="./xsf:menuArea"/> <xsd:fieldxpath="@name"/> </xsd:unique> <xsd:uniquename="xmlToEdit_name_unique"> <xsd:selectorxpath="./xsf:editing/xsf:xmlToEdit"/> <xsd:fieldxpath="@name"/> </xsd:unique> <xsd:keyname="xmlToEdit_name_key"> <xsd:selectorxpath="./xsf:editing/xsf:xmlToEdit"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:keyrefname="button_xmlToEdit_reference"refer="xsf:xmlToEdit_name_key"> <xsd:selectorxpath="./xsf:menuArea/xsf:button|./xsf:menu/xsf:button|./xsf:toolbar/xsf:button"/> <xsd:fieldxpath="@xmlToEdit"/> </xsd:keyref> </xsd:element> <!--xmlToEdit--> <xsd:elementname="xmlToEdit"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:editWith"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="name"type="xsd:NMTOKEN"use="required"/> <xsd:attributename="item"type="xsd:string"use="required"/> <xsd:attributename="container"type="xsd:string"/> <xsd:attributename="viewContext"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:patternvalue="((\.|\#|[a-zA-Z0-9_])[a-zA-Z0-9_]*)(\s((\.|\#|[a-zA-Z0-9_])[a-zA-Z0-9_]*))*"/> </xsd:restriction>

Page 1676: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> <!--DigitalSignatures--> <xsd:elementname="documentSignatures"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:signedDataBlock"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="signatureLocation"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="signedDataBlock"> <xsd:complexType> <xsd:sequence> <xsd:elementname="message"type="xsf:xdSignedDataBlockMessage"minOccurs="0"/> </xsd:sequence> <xsd:attributename="name"type="xsf:xdSignedDataBlockName"use="required"/> <xsd:attributename="data"type="xsd:string"use="required"/> <xsd:attributename="signatureLocation"type="xsd:string"use="required"/> <xsd:attributename="mode"type="xsf:xdSignatureRelationEnum"use="required"/> </xsd:complexType> <xsd:uniquename="signedDataBlock_name_unique"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@name"/> </xsd:unique> </xsd:element> <!--VersionUpgrade--> <xsd:elementname="documentVersionUpgrade"> <xsd:complexType> <xsd:choice> <xsd:elementref="xsf:useScriptHandler"/>

Page 1677: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:elementref="xsf:useTransform"/> </xsd:choice> </xsd:complexType> </xsd:element> <xsd:elementname="useTransform"> <xsd:complexType> <xsd:attributename="transform"use="required"> <xsd:simpleType> <xsd:unionmemberTypes="xsf:xdFileNamexsf:xdEmptyString"/> </xsd:simpleType> </xsd:attribute> <xsd:attributename="minVersionToUpgrade"type="xsf:xdSolutionVersion"use="required"/> <xsd:attributename="maxVersionToUpgrade"type="xsf:xdSolutionVersion"/> </xsd:complexType> </xsd:element> <!--XSFExtensions--> <xsd:elementname="extensions"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:extension"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="extension"> <xsd:complexTypemixed="true"> <xsd:sequence> <xsd:anyminOccurs="0"maxOccurs="unbounded"processContents="skip"/> </xsd:sequence> <xsd:attributename="name"type="xsd:NMTOKEN"use="required"/> <xsd:anyAttributeprocessContents="skip"/> </xsd:complexType> </xsd:element> <!--Rules-->

Page 1678: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:elementname="ruleSetAction"> <xsd:complexType> <xsd:attributename="ruleSet"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="rule"> <xsd:complexType> <xsd:sequence> <xsd:choiceminOccurs="0"maxOccurs="unbounded"> <xsd:elementref="xsf:dialogBoxMessageAction"/> <xsd:elementref="xsf:dialogBoxExpressionAction"/> <xsd:elementref="xsf:switchViewAction"/> <xsd:elementref="xsf:assignmentAction"/> <xsd:elementref="xsf:queryAction"/> <xsd:elementname="submitAction"> <xsd:complexType> <xsd:attributename="adapter"type="xsf:xdTitle"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementref="xsf:openNewDocumentAction"/> <xsd:elementref="xsf:closeDocumentAction"/> </xsd:choice> <xsd:elementname="exitRuleSet"minOccurs="0"> <xsd:complexType/> </xsd:element> </xsd:sequence> <xsd:attributename="caption"type="xsd:string"use="required"/> <xsd:attributename="condition"type="xsd:string"use="optional"/> <xsd:attributename="isEnabled"type="xsf:xdYesNo"use="optional"default="yes"/> </xsd:complexType> </xsd:element> <xsd:elementname="dialogBoxMessageAction"> <xsd:simpleType>

Page 1679: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="1024"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:elementname="dialogBoxExpressionAction"type="xsd:string"/> <xsd:elementname="switchViewAction"> <xsd:complexType> <xsd:attributename="view"type="xsf:xdViewName"use="required"/> </xsd:complexType> <xsd:keyrefname="switchViewAction_view_keyref"refer="xsf:view_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@view"/> </xsd:keyref> </xsd:element> <xsd:elementname="assignmentAction"> <xsd:complexType> <xsd:attributename="targetField"type="xsd:string"use="required"/> <xsd:attributename="expression"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="queryAction"> <xsd:complexType> <xsd:attributename="adapter"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="openNewDocumentAction"> <xsd:complexType> <xsd:attributename="solutionURI"type="xsd:anyURI"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="closeDocumentAction"> <xsd:complexType>

Page 1680: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:attributename="promptToSaveChanges"type="xsf:xdYesNo"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="ruleSet"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:rule"minOccurs="1"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="name"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="ruleSets"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:ruleSet"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:uniquename="ruleSets_name_unique"> <xsd:selectorxpath="./xsf:ruleSet"/> <xsd:fieldxpath="@name"/> </xsd:unique> </xsd:element> <!--DeclarativeCalculations--> <xsd:elementname="calculations"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:calculatedField"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="treatBlankValueAsZero"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="calculatedField"> <xsd:complexType>

Page 1681: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:attributename="target"type="xsd:string"use="required"/> <xsd:attributename="expression"type="xsd:string"use="required"/> <xsd:attributename="refresh"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element></xsd:schema>

Page 1682: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1683: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xsfNamespace

TheMicrosoftOfficeInfoPath2003formdefinition(.xsf)fileconformstoanXSDschemadefinition,andusesacorrespondingnamespace.

Page 1684: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

NamespaceURI

xmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"

Page 1685: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksAlloftheelementswithinthe.xsffilearenamespacequalifiedusingthexsfnamespace.

Page 1686: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1687: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdDesignModeType

Specifieswhetheraview(*.xsl)filecanbeopenedindesignmodeinMicrosoftOfficeInfoPath2003.

Page 1688: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:NMTOKEN

Page 1689: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name Descriptionenumeration normalenumeration protected

Page 1690: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexdDesignModetypeisusedforattributesintheformdefinitionfile(.xsf)tospecifywhetheraviewcanbeopenedindesignmode("normal"),orwhethertheviewisnotpermittedtobeopenedindesignmode("protected").

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1691: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdDesignModetype:

<xsd:simpleTypename="xdDesignMode"><xsd:restrictionbase="xsd:NMTOKEN"><xsd:enumerationvalue="normal"/><xsd:enumerationvalue="protected"/></xsd:restriction></xsd:simpleType>

Page 1692: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1693: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdEmptyStringType

Specifiesanemptystring.

Page 1694: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 1695: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name DescriptionmaxLength 0

Page 1696: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexdEmptyStringtypeisusedforattributesintheformdefinition(.xsf)filethatspecifyanemptystring.

Page 1697: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdEmptyStringtype:

<xsd:simpleTypename="xdEmptyString"><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="0"/></xsd:restriction></xsd:simpleType>

Page 1698: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdEnabledDisabledType

Specifieswhetherafeatureisenabledordisabled.

Page 1699: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:NMTOKEN

Page 1700: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name Descriptionenumeration enabledenumeration disabled

Page 1701: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1702: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdEnabledDisabledtype:

<xsd:simpleTypename="xdEnabledDisabled"><xsd:restrictionbase="xsd:NMTOKEN"><xsd:enumerationvalue="enabled"/><xsd:enumerationvalue="disabled"/></xsd:restriction></xsd:simpleType>

Page 1703: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1704: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdErrorMessageType

Specifiesanerrormessage.

Page 1705: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 1706: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name DescriptionmaxLength 1023

Page 1707: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexdErrorMessagetypeisusedforattributesintheformdefinition(.xsf)filethatspecifyanerrormessagenogreaterthan1023charactersinlength.

Page 1708: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdErrorMessagetype:

<xsd:simpleTypename="xdErrorMessage"><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="1023"/></xsd:restriction></xsd:simpleType>

Page 1709: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1710: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdExpressionLiteralsimpleType

SpecifiesatypeforidentifyingwhetheravalueshouldbeinterpretedasaliteralvalueoranXPathexpressionthatreturnsavalue.

Page 1711: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:NMTOKEN

Page 1712: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexdExpressionLiteraltypeisusedforthevalueTypeattributeinthedavAdapterandemailAdapterelements.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1713: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdExpressionLiteraltype:

<xsd:simpleTypename="xdExpressionLiteral"><xsd:restrictionbase="xsd:NMTOKEN"><xsd:enumerationvalue="expression"/><xsd:enumerationvalue="literal"/></xsd:restriction></xsd:simpleType>

Page 1714: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1715: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdFileNameType

Specifiesthenameofafile.

Page 1716: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 1717: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name DescriptionminLength 1maxLength 64

Page 1718: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexdFileNametypeisusedforattributesintheformdefinition(.xsf)filethatspecifyafilenamethatcanbefrom1to64charactersinlength.

Page 1719: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdFileNametype:

<xsd:simpleTypename="xdFileName"><xsd:restrictionbase="xsd:string"><xsd:minLengthvalue="1"/><xsd:maxLengthvalue="64"/></xsd:restriction></xsd:simpleType>

Page 1720: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdHWSCaptionsimpleType

SpecifiesatypeforthecaptionoftheMicrosoftBiztalkServer2004HWS(HumanWorkflowServices)actionortaskelement.

Page 1721: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 1722: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name DescriptionmaxLength 255charactersminLength 1character

Page 1723: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThelengthofthecaptioncannotbelessthanonecharacterorgreaterthan255characters.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1724: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdHWSCaptiontype:

<xsd:simpleTypename="xdHWSCaption"><xsd:restrictionbase="xsd:string"><xsd:minLengthvalue="1"/><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType>

Page 1725: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdHWSnamesimpleType

SpecifiesatypeforauniquenameoftheMicrosoftBiztalkServer2004HWS(HumanWorkflowServices)actionortaskelementasspecifiedbytheHWSworkflowdesigner.

Page 1726: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:NCName

Page 1727: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name Descriptionpattern [^-^\.^\\^\[^\]^\|^\+^?^\*^@^\{^\}^\(^\)^&gt;^&lt;^=^;^,]*

Page 1728: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenamecannotcontainthefollowingcharacters:

\/"[]:<>+=;,?*@

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1729: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdHWSnametype:

<xsd:simpleTypename="xdHWSname"><xsd:restrictionbase="xsd:NCName"><xsd:patternvalue="[^-^\.^\\^\[^\]^\|^\+^?^\*^@^\{^\}^\(^\)^&gt;^&lt;^=^;^,]*"/></xsd:restriction></xsd:simpleType>

Page 1730: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1731: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdManualAutoType

Specifiesa"manual"or"automatic"value.

Page 1732: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:NMTOKEN

Page 1733: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name Descriptionenumeration manualenumeration automatic

Page 1734: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexdTrustManualAutotypeisusedforattributesintheformdefinition(.xsf)filethatrequirea"manual"or"automatic"value.Thedefaultvalueis"manual".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1735: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdManualAutotype:

<xsd:simpleTypename="xdManualAuto"><xsd:restrictionbase="xsd:NMTOKEN"><xsd:enumerationvalue="manual"/><xsd:enumerationvalue="automatic"/></xsd:restriction></xsd:simpleType>

Page 1736: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdRoleNameType

Specifiestherolename.

Page 1737: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdViewName

Page 1738: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksRolenamehasrestrictionsonvaluesitcancontain.Theserestrictionsarethesameastheconstrainingfacetsofthexsf:xdViewNametype.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1739: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdRoleNametype:

<xsd:simpleTypename="xdRoleName"><xsd:restrictionbase="xsf:xdViewName"></xsd:restriction></xsd:simpleType>

Page 1740: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1741: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdScriptLanguageType

Specifiesthenameofascriptinglanguage.

Page 1742: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 1743: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name Descriptionpattern ((([Jj][Aa][Vv][Aa])|([Jj])|([Vv][Bb]))([Ss][Cc][Rr][Ii][Pp][Tt]))

Page 1744: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexdScriptLanguagetypeisusedforattributesintheformdefinition(.xsf)filethatspecifythenameofascriptinglanguage.

Page 1745: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdScriptLanguagetype:

<xsd:simpleTypename="xdScriptLanguage"><xsd:restrictionbase="xsd:NMTOKEN"><xsd:patternvalue="((([Jj][Aa][Vv][Aa])|([Jj])|([Vv][Bb]))([Ss][Cc][Rr][Ii][Pp][Tt]))"/></xsd:restriction></xsd:simpleType>

Page 1746: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdSignatureRelationEnumType

ContainsthesignaturerelationenumerationforthesignedDataBlockelement.

Page 1747: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 1748: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name Descriptioncountersign Specifiesthateachsignaturesignstheprevioussignaturein

thesignedDataBlock.cosign SpecifiesthateachsignatureinthesignedDataBlockis

independent.single Specifiesthatonlyonesignatureisallowedforthe

signedDataBlock.

Page 1749: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1750: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdSignatureRelationEnumtype:

<xsd:simpleTypename="xdSignatureRelationEnum"><xsd:restrictionbase="xsd:string"><xsd:enumerationvalue="countersign"/><xsd:enumerationvalue="cosign"/><xsd:enumerationvalue="single"/></xsd:restriction></xsd:simpleType>

Page 1751: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdSignedDataBlockMessageType

Definesthemaximumstringlengthforthesignaturesconfirmationmessageelement.

Page 1752: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:simpleType

Page 1753: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name DescriptionmaxLength 255characters

Page 1754: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesignatureconfirmationmessagehasamaximumlengthof255characters.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1755: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdSignedDataBlockMessagetype:

<xsd:simpleTypename="xdSignedDataBlockMessage"><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType>

Page 1756: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdSignedDataBlockNameType

DefinesthemaximumstringlengthforthenameattributeofthesignedDataBlockelement.

Page 1757: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:simpleType

Page 1758: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name DescriptionmaxLength 255charactersminLength 1character

Page 1759: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1760: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdSignedDataBlockNametype:

<xsd:simpleTypename="xdSignedDataBlockName"><xsd:restrictionbase="xsd:ID"><xsd:minLengthvalue="1"/><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType>

Page 1761: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1762: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdSolutionVersionType

Specifiesaversionnumber.

Page 1763: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 1764: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name Descriptionpattern (([0-9]{1,4}.){3}[0-9]{1,4})

Page 1765: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexdSolutionVersiontypeisusedforattributesintheformdefinition(.xsf)filethatspecifyaversionnumber.

Page 1766: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdSolutionVersiontype:

<xsd:simpleTypename="xdSolutionVersion"><xsd:restrictionbase="xsd:string"><xsd:patternvalue="(([0-9]{1,4}.){3}[0-9]{1,4})"/></xsd:restriction></xsd:simpleType>

Page 1767: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1768: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdTitleType

Specifiesatitlestring.

Page 1769: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 1770: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name DescriptionminLength 1maxLength 255pattern ([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*

([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

Page 1771: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexdTitletypeisusedforattributesintheformdefinition(.xsf)filethatareastringofcharactersthatcanbefrom1to255charactersinlength,andthatfollowaprescribedpattern.

Page 1772: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdTitletype:

<xsd:simpleTypename="xdTitle"><xsd:restrictionbase="xsd:string"><xsd:minLengthvalue="1"/><xsd:maxLengthvalue="255"/><xsd:patternvalue="([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?"/></xsd:restriction></xsd:simpleType>

Page 1773: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1774: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdTrustLevelType

Specifiesa"restricted"or"domain"value.

Page 1775: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 1776: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name Descriptionenumeration restrictedenumeration domain

Page 1777: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexdTrustLeveltypeisusedforattributesintheformdefinition(.xsf)filethatrequirea"restricted"or"domain"value.Thedefaultvalueis"domain".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1778: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdTrustLeveltype:

<xsd:simpleTypename="xdTrustLevel"><xsd:restrictionbase="xsd:string"><xsd:enumerationvalue="restricted"/><xsd:enumerationvalue="domain"/></xsd:restriction></xsd:simpleType>

Page 1779: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1780: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdViewNameType

Specifiesaviewname.

Page 1781: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 1782: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name DescriptionminLength 1maxLength 255pattern ([^\p{Z}\p{C}/\\#&amp;&quot;&gt;&lt;])

(([^\p{Zl}\p{Zp}\p{C}/\\#&amp;&quot;&gt;&lt;])*([^\p{Z}\p{C}/\\#&amp;&quot;&gt;&lt;]))?

Page 1783: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexdViewNametypeisusedforattributesintheformdefinition(.xsf)filethatareastringofcharactersthatcanbefrom1to255charactersinlength,andthatfollowaprescribedpattern.

Page 1784: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdViewNametype:

<xsd:simpleTypename="xdViewName"><xsd:restrictionbase="xsd:string"><xsd:minLengthvalue="1"/><xsd:maxLengthvalue="255"/><xsd:patternvalue="([^\p{Z}\p{C}/\\#&amp;&quot;&gt;&lt;])(([^\p{Zl}\p{Zp}\p{C}/\\#&amp;&quot;&gt;&lt;])*([^\p{Z}\p{C}/\\#&amp;&quot;&gt;&lt;]))?"/></xsd:restriction></xsd:simpleType>

Page 1785: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1786: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xdYesNoType

Specifiesayesornovalue.

Page 1787: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 1788: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Facets

Name Descriptionenumeration yesenumeration no

Page 1789: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexdYesNotypeisusedforattributesintheformdefinition(.xsf)filethatrequireayesornovalue.

Page 1790: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleisthedeclarationofthexdYesNotype:

<xsd:simpleTypename="xdYesNo"><xsd:restrictionbase="xsd:NMTOKEN"><xsd:enumerationvalue="yes"/><xsd:enumerationvalue="no"/></xsd:restriction></xsd:simpleType>

Page 1791: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1792: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UIContainerGroup

Representsacollectionofuserinterface(UI)elements.

Page 1793: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheUIContainergroupisusedasanelementoftheViewContentgroup.

Page 1794: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleistheXMLSchemadeclarationoftheUIContainergroup:

<xsd:groupname="UIContainer"><xsd:choice><xsd:elementref="xsf:toolbar"/><xsd:elementref="xsf:menu"/><xsd:elementref="xsf:menuArea"/></xsd:choice></xsd:group>

Page 1795: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1796: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

UIItemGroup

Representsacollectionofuserinterface(UI)elements.

Page 1797: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheUIItemgroupisusedasanelementofthetoolbar,menu,andmenuAreaelements.

Page 1798: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleistheXMLSchemadeclarationoftheUIItemgroup:

<xsd:groupname="UIItem"><xsd:choice><xsd:elementref="xsf:button"/><xsd:elementref="xsf:menu"/></xsd:choice></xsd:group>

Page 1799: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1800: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ViewContentGroup

Representsacollectionofelementsusedinaview.

Page 1801: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheViewContentgroupisusedasanelementoftheviewelement.

Page 1802: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleistheXMLSchemadeclarationoftheViewContentgroup:

<xsd:groupname="ViewContent"><xsd:choice><xsd:elementref="xsf:editing"minOccurs="0"/><xsd:elementref="xsf:mainpane"minOccurs="0"/><xsd:elementref="xsf:printSettings"minOccurs="0"/><xsd:groupref="xsf:UIContainer"minOccurs="0"maxOccurs="unbounded"/><xsd:elementref="xsf:unboundControls"minOccurs="0"/></xsd:choice></xsd:group>

Page 1803: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1804: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

actionElement

ContainstheMicrosoftBiztalkServer2004HumanWorkflowServices(HWS)actioninformationthathasbeenenabledfortheform.

Page 1805: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1806: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 1807: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

name xsf:xdHWSname Yes TheuniquenameoftheactionasspecifiedbytheHWSworkflowdesigner,andusedfortheonClickeventofthebuttonintheWorkflowtaskpane.

Cannotcontainthefollowingcharacters:

\/"[]:<>+=;,?*@

actionTypeID xsd:string Yes TheuniqueIDfortheaction.

string

canInitiateWorkflow xsf:xdYesNo Yes Indicateswhethertheactioncanbeusedtostartanactivityflow.

yes

no

caption xsf:xdHWSCaption No ThelabelforthecorrespondingbuttonintheWorkflowtaskpanetostarttheaction.

minLength=1

maxLength=255

Page 1808: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="action"><xsd:complexType><xsd:attributename="name"type="xsf:xdHWSname"use="required"></xsd:attribute><xsd:attributename="actionTypeID"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="canInitiateWorkflow"type="xsf:xdYesNo"use="required"></xsd:attribute><xsd:attributename="caption"type="xsf:xdHWSCaption"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 1809: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheactionelementisanoptionalelementoftheallowedActionselement.

EachactionenabledfortheformmusthaveacorrespondingactionelementintheallowedActionssectionoftheformdefinitionfile(.xsf).

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1810: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheactionelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

Page 1811: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 1812: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1813: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

adoAdapterElement

DefinesanActiveXDataObjects(ADO)dataadapterthatretrievesdatafromanADOdatasourceforthespecifieddataobject.

Page 1814: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 1815: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptioncommandText (Requiredattribute)Astringpropertythatcontains

theADOSQLcommandtexttobeusedforqueryingthedatafromthespecifieddatasource.

connectionString (Requiredattribute)AstringpropertythatcontainstheADOconnectionstringtobeusedtoconnecttothedatasource.

name (Optionalattribute)ContainsthenameoftheadoAdapterelement.

queryAllowed (Optionalattribute)SpecifieswhetherdatacanberetrievedfromthedatasourcethroughtheQuerymethodofthedataadapterobject.

submitAllowed (Optionalattribute)SpecifieswhetherdatacanbesubmittedtothedatasourcethroughtheSubmitmethodofthedataadapterobject.

Page 1816: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheadoAdapterelementisanoptionalelementofthequeryelement.

Page 1817: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheadoAdapterelement:

<xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

Page 1818: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1819: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

allowedActionsElement

ContainstheMicrosoftBiztalkServer2004HumanWorkflowServices(HWS)actionsenabledfortheform.

Page 1820: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1821: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element Descriptionaction Containstheinformationforanindividualaction.

Page 1822: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 1823: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="allowedActions"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:action"minOccurs="1"maxOccurs="20"/></xsd:sequence></xsd:complexType><xsd:uniquename="hws_actionTypeID_unique"><xsd:selectorxpath="./xsf:action"/><xsd:fieldxpath="@actionTypeID"/></xsd:unique></xsd:element>

Page 1824: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheallowedActionselementisanoptionalelementofthehwsWorkflowelement.

EachactiontobeenabledfortheformmusthaveacorrespondingactionelementintheallowedActionssectionoftheformdefinitionfile(.xsf).

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1825: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheallowedActionselement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

Page 1826: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 1827: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1828: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

allowedControlElement

SpecifiestheActiveXcontrolsthatareallowedtobeinstantiated.

Page 1829: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1830: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 1831: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

cabFile xsd:string No SpecifiesthenameoftheCABfile.

string

clsid xsd:string Yes SpecifiestheCLSID(COMclassID)oftheActiveXcontrol.

string

version xsd:string No SpecifiestheActiveXcontrolversionnumber.

string

Page 1832: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="allowedControl"><xsd:complexType><xsd:attributename="cabFile"type="xsd:string"use="optional"></xsd:attribute><xsd:attributename="clsid"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="version"type="xsd:string"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 1833: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksWhentheviewcontainsanOBJECTtag,thecontrolwillbeinstantiatedonlyiftheCLSIDislistedasanallowedControlelementinthepermissionselement.ControlsotherthanthosecorrespondingtotheCLSIDslistedinthepermissionselementarenotallowedtobeinstantiatedintheview.

IfanActiveXcontrollistedinthepermissionselementisnotinstalled(thatis,ifaCLSIDofacontrolisnotregistered),orifanearlierversionofthecontrolthanthatversionspecifiedinthepermissionselementistheonlyversioninstalled,thentherequiredCABfileswillbeinstalled.IftheCABfilesarenotincluded,oriftheinstallationisstopped,theformwillnotopen.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1834: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheallowedControlelement:

<xsf:permissions><xsf:allowedControlcabFile="{84F32C01-78D8-4B93-8ED4-106DA70224C2}.cab”clsid="{84F32C01-78D8-4B93-8ED4-106DA70224C2}"version=”1,0,0,1”/><xsf:allowedControlclsid="{F08DF954-8592-11D1-B16A-00C0F0283630}"/></xsf:permissions>

Page 1835: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1836: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

allowedTasksElement

ContainstheMicrosoftBiztalkServer2004HumanWorkflowServices(HWS)tasksenabledfortheform.

Page 1837: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1838: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element Descriptiontask Containstheinformationforanindividualtask.

Page 1839: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 1840: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="allowedTasks"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:task"minOccurs="1"maxOccurs="20"/></xsd:sequence></xsd:complexType><xsd:uniquename="hws_taskID_unique"><xsd:selectorxpath="./xsf:task"/><xsd:fieldxpath="@taskTypeID"/></xsd:unique></xsd:element>

Page 1841: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheallowedTaskselementisanoptionalelementofthehwsWorkflowelement.

EachtasktobeenabledfortheformmusthaveacorrespondingtaskelementintheallowedTaskssectionoftheformdefinitionfile(.xsf).

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1842: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheallowedTaskselement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

Page 1843: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 1844: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1845: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

applicationParametersElement

Containsform-specificpropertiesthatdescribehowaformshouldbeusedinMicrosoftOfficeInfoPath2003designmode.

Page 1846: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 1847: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionapplication (Requiredattribute)Identifiesthenameofthe

applicationusedtodesigntheInfoPathform.solutionProperties (Optionalelement)Containsdesign-timeinformation

abouttheInfoPathform.

Page 1848: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheapplicationParameterselementisanoptionalelementofthexDocumentClasselement.

Page 1849: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheapplicationParameterselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:names?pace1:mynames"/></xsf:applicationParameters>

Page 1850: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1851: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

assignmentActionElement

Definesanactiontosetthevalueofafield.

Page 1852: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1853: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 1854: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

targetField xsd:string Yes ContainsanXPathexpressionforthetargetnode.

string

expression xsd:string Yes ContainsanXPathexpressiontopopulatethevalueofthetargetField.

string

Page 1855: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="assignmentAction"><xsd:complexType><xsd:attributename="targetField"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="expression"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 1856: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheassignmentActionelementisachildelementoftheruleelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1857: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheassignmentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 1858: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1859: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

attachmentFileNameElement

Containsthefilenameofthefileattachmenttobeincludedwiththee-mailmessagewhentheformissubmittedbyusingtheemailAdapterelement.

Page 1860: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1861: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionemailAdapter Parentelementthatcontainstheinformationtosubmita

MicrosoftOfficeInfoPathfileasanattachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

Page 1862: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 1863: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes ContainsthevalueoftheattachmentFileNameelement.

string

valueType xsf:xdExpressionLiteralNo SpecifieswhetherthevalueattributeisinterpretedasanXPathexpressionoraliteralstring.

expression

literal

Page 1864: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="attachmentFileName"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 1865: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheattachmentFileNameelementisachildelementoftheemailAdapterelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1866: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheattachmentFileNameelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="[email protected]"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="[email protected]"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

Page 1867: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

attributeDataElement

Specifiesthename,andassociatedvalue,ofanattributethatwillbeinserted,ormodifiedifitalreadyexists,bytheinsertactionofthexCollectionorxOptionaleditingcomponents.

Page 1868: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 1869: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionattribute (Requiredattribute)Specifiesthenameoftheattributetobe

inserted.value (Requiredattribute)Specifiesthevalueoftheattributetobe

inserted.

Page 1870: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheattributeDataelementisanoptionalelementofthechooseFragmentelement.

Page 1871: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheattributeDataelement:

<xsf:editWithcomponent="xOptional"><xsf:fragmentToInsert><xsf:chooseFragmentparent="report"><xsf:attributeDataattribute="author"value="authorname"/></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith>

Page 1872: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

autoRecoveryElement

SpecifieswhethertheformwillsaveAutoRecoverinformationandwhethertheAutoRecoversettingcanbechangedbytheuser.

Page 1873: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1874: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 1875: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

feature xsf:xdEnabledDisabled required SetswhethertheAutoRecoverfeatureisenabled.

enabled

disabled

Page 1876: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="autoRecovery"><xsd:complexType><xsd:attributename="feature"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 1877: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheautoRecoveryelementisanoptionalelementofthefeatureRestrictionselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1878: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheautoRecoveryelement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

Page 1879: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1880: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

bccElement

ContainsinformationrelatedtotheBCCrecipientsofthee-mailmessagewhentheformissubmittedusingtheemailAdapterelement.

Page 1881: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1882: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionemailAdapter Parentelementthatcontainstheinformationneededto

submitaMicrosoftOfficeInfoPath2003SP1fileasanattachmenttoane-mail,withaspecifiedsetofrecipients,asubject,andanintroduction.

Page 1883: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 1884: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes Containsthevalueofthebccelement.

string

valueType xsf:xdExpressionLiteralNo SpecifieswhetherthevalueattributeisinterpretedasanXPathexpressionorasaliteralstring.

expression

literal

Page 1885: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="bcc"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 1886: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfmultipleaddressesarespecifedforthevalueofthebccelement,theaddressesmustbeseparatedbysemicolons.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1887: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthebccelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="[email protected]""valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="[email protected]"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

Page 1888: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1889: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

buttonElement

Definesabuttonthathasanassociatedaction.

Page 1890: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 1891: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionaction (Optionalattribute)Specifiesanactionofanediting

component,usingthesyntax"NameOfEditingComponent::NameOfAction".

caption (Optionalattribute)Providesthecaptiondisplayedonthebutton.

icon (Optionalattribute)ProvidesaUniformResourceLocator(URL)toabitmap(.bmp)orgraphicsinterchangeformat(.gif)file,whichisusedforthebuttonormenuitem.

name (Optionalattribute)UsedtoassociatetheOnClickeventhandlerofthebuttonwithascriptingfunction.

showIf (Optionalattribute)Specifiestheeditingcontextofthebutton.tooltip (Optionalattribute)ProvidestheScreenTiptexttobeusedfor

thebutton.xmlToEdit (Optionalattribute)SpecifiesthenameofanxmlToEdit

element,forwhichthebuttonisused.

Page 1892: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThebuttonelementisanoptionalelementofthetoolbar,menu,andmenuAreaelements.Eachbuttonelementdeclarationcorrespondstoabuttononatoolbar,menu,ormenuareaitem,andeachbuttonhasanaction(orcommand)associatedwithit.

Page 1893: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthebuttonelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

Page 1894: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1895: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

calculatedFieldElement

Definesanindividualcalculation,includingtheformula,whenthecalculationistobeperformed,andwheretheresultwillbestored.

Page 1896: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1897: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 1898: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

target xsd:string Yes ContainstheXPathlocationwheretheresultoftheexpressionwillbestored.

string

expression xsd:string Yes Containstheformula,intheformofanXPathexpression,tobeevaluated.Theresultisstoredinthetargetlocation.

string

refresh xsd:string Yes Specifieswhentheexpressionwillbeevaluated.

onInit

onChange

Page 1899: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="calculatedField"><xsd:complexType><xsd:attributename="target"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="expression"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="refresh"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 1900: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1901: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecalculatedFieldelement:

<xsf:calculations><xsf:calculatedFieldtarget="/my:myFields/my:average"expression="xdMath:Avg(../my:expenses/my:expense/my:amount)"refresh="onChange"/></xsf:calculations>

Page 1902: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1903: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

calculationsElement

Containsdefinitionsforcalculationsperformedintheformandspecifieshowblankvaluesarehandled.

Page 1904: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1905: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element DescriptioncalculatedField Definesanindividualcalculation,includingtheformula,

whenthecalculationistobeperformed,andwheretheresultwillbestored.

Page 1906: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

treatBlankValueAsZero xsf:xdYesNo No Specifieswhetherablankfieldshouldbecalculatedwithavalueofzero.Defaultisyes.

yes

no

Page 1907: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="calculations"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:calculatedField"minOccurs="0"maxOccurs="unbounded"/></xsd:sequence><xsd:attributename="treatBlankValueAsZero"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 1908: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksEverycalculationintheformwillhaveacalculatedFieldelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1909: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecalculationselement:

<xsf:calculations><xsf:calculatedFieldtarget="/my:myFields/my:average"expression="xdMath:Avg(../my:expenses/my:expense/my:amount)"refresh="onChange"/></xsf:calculations>

Page 1910: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1911: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ccElement

ContainsinformationrelatedtotheCCrecipientsofthee-mailmessagewhentheformissubmittedusingtheemailAdapterelement.

Page 1912: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1913: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionemailAdapter Parentelementthatcontainstheinformationneededto

submitaMicrosoftOfficeInfoPath2003SP1fileasanattachmenttoane-mail,withaspecifiedsetofrecipients,asubject,andanintroduction.

Page 1914: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 1915: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes Containsthevalueoftheccelement.

string

valueType xdExpressionLiteral No SpecifieswhetherthevalueattributeisinterpretedasanXPathexpressionoraliteralstring.

expression

literal

Page 1916: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="cc"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 1917: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfmultipleaddressesarespecifedforthevalueoftheccelement,theaddressesmustbeseparatedbysemicolons.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1918: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheccelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="[email protected]"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="[email protected]"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

Page 1919: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1920: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

chooseFragmentElement

SpecifiesanXMLfragment.

Page 1921: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 1922: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionattributeData (Optionalelement)Specifiesthename,and

associatedvalue,ofanattributethatwillbeinserted,ormodifiedifitalreadyexists,bytheinsertactionofthexCollectionorxOptionaleditingcomponents.

followingSiblings (Optionalattribute)SpecifiesarelativeXPathexpressionfromtheparentnodethatspecifiestheXMLDocumentObjectModel(DOM)nodespriortowhichtheinsertionoftheXMLfragmentshouldoccur.

NoteThisisnotnecessaryinMicrosoftOfficeInfoPath2003ServicePack1andwillnotbeautomaticallygeneratedbyInfoPath.

parent (Optionalattribute)SpecifiesarelativeXPathexpressionfromthecontainernodethatspecifiestheXMLDOMnodeunderwhichtheXMLfragmentisinserted.

innerFragment (Optionalattribute)SpecifiesarelativeXPathexpressionfromtheparentnodetothesmallestfragmenttobeinserted.

NoteUseofthisattributerequiresMicrosoftOfficeInfoPath2003ServicePack1.

Page 1923: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThechooseFragmentelementisarequiredelementofthefragmentToInsertelement.

ThechooseFragmentelementhasanopencontentmodel.Itmaycontaintext,oroneormoreelementnodes,ormixedcontent(bothelementnodesandtextnodes).InadditiontoorinsteadofXMLdatatobeinserteddirectlyasafragment,itcancontainoneormoreattributeDataelements.InthiscasetheattributeDataelementsarenotincludedasinsertedcontent,butareeachusedtospecifysettinganattributevalue.

ThechooseFragmentelementsaretypicallyorderedinincreasingsize.ThefirstwillbethedatafragmenttobeinsertedbytheinsertBeforeandinsertAfteractions,whenthereisalreadyatleastoneiteminthecollection.Theinsertaction,ontheotherhand,canbeinvokedwhenthereiscurrentlyanodeintheXMLtreecorrespondingtoacontainer,butnonodecorrespondingtoanitem(inotherwords,itcanbeusedtoinsertthefirstitem).

NoteMicrosoftOfficeInfoPath2003ServicePack1willgenerateonlyonechooseFragmentnode.Formoreinformation,seetheinnerFragmentattribute.

NoteAnyelementcontentwithintheXMLfragment,otherthanattributedata,correspondstonewcontenttobeinsertedintotheform'sunderlyingXMLdocument,andshouldbeintheappropriatenamespace.

Page 1924: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthechooseFragmentelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 1925: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1926: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

closeDocumentActionElement

Definesaformcloseaction.

Page 1927: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1928: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 1929: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

promptToSaveChanges xdYesNo Yes Specifieswhethertheuserispromptedtosavechangestotheformbeforetheactioncompletes.Defaultis"yes".

yes

no

Page 1930: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="closeDocumentAction"><xsd:complexType><xsd:attributename="promptToSaveChanges"type="xsf:xdYesNo"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 1931: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecloseDocumentActionelementisachildelementoftheruleelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1932: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecloseDocumentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 1933: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1934: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

customCategoryElement

SpecifiesthecategorythattheformtemplateappearsunderintheFillOutaFormtaskpane.

Page 1935: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1936: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 1937: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required Description PossibleValuesname xsf:xdTitle required Specifies

thenameofthecustomcategory.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

Page 1938: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="customCategory"><xsd:complexType><xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 1939: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecustomCategoryelementisanoptionalelementoftheinitialXmlDocumentelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1940: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecustomCategoryelement:

<xsf:fileNew><xsf:initialXmlDocumentcaption="TravelReport"href="TravelReportTemplate.xml"><xsf:customCategoryname="Reports"/></xsf:initialXmlDocument></xsf:fileNew>

Page 1941: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1942: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

customValidationElement

Definesrule-basedcustomvalidationontopofallvalidationenforcedthroughtheXMLSchema.

Page 1943: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 1944: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionerrorCondition (Optionalelement)Definesacustomvalidation(orerror

condition)foraspecificXMLDocumentObjectModel(DOM)nodeinaform'sunderlyingXMLdocument.

Page 1945: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecustomValidationelementisanoptionalelementofthexDocumentClasselement.

NoteItispossibletocreatemultipleerrorconditionsonafieldinaformusingmultipleerrorConditionelements,buttheywillnotappearintheDataValidationdialogboxwhileindesignmode.

Page 1946: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecustomValidationelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

Page 1947: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1948: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

dataAdaptersElement

Containsinformationaboutsubmitadaptersthatareusedasthemainsubmitadaptersfortheformandthatthereforearenotdeclaredinlinewithinthesubmitelement.

Page 1949: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1950: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element DescriptionwebServiceAdapter ContainsinformationtoenableInfoPathformsto

besubmittedtoanXMLWebservice.davAdapter ContainsinformationtoenableInfoPathformsto

besubmittedtoaserverrunningMicrosoftWindowsSharePointServicesortoaWeb-basedDistributedAuthoringandVersioning(WebDAV)server.

emailAdapter ContainsinformationtoenablesubmissionofanInfopathformasanattachmenttoane-mail,withaspecifiedsetofrecipients,asubject,andanintroduction.

hwsAdapter DefinestheMicrosoftBiztalk2004HumanWorkflowServices(HWS)dataadapterthatisusedtostartorextendanactivityflowandrespondtoatask.

Page 1951: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 1952: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="dataAdapters"><xsd:complexType><xsd:choiceminOccurs="0"maxOccurs="unbounded"><xsd:elementref="xsf:webServiceAdapter"/><xsd:elementref="xsf:davAdapter"/><xsd:elementref="xsf:emailAdapter"/><xsd:elementref="xsf:hwsAdapter"/></xsd:choice></xsd:complexType></xsd:element>

Page 1953: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedataAdapterselementisanoptionalelementofthexDocumentClasselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1954: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedataAdapterselement:

<xsf:dataAdapters><xsf:webServiceAdaptername="submit2"...submitAllowed="yes">...</xsf:webServiceAdapter><xsf:emailAdaptername="submit4"…submitAllowed="yes"/></xsf:dataAdapters>

Page 1955: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1956: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

dataObjectElement

DefinesasecondarydataobjectthatisusedinaMicrosoftOfficeInfoPath2003form.

Page 1957: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 1958: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptioninitOnLoad (Optionalattribute)Specifieswhetherthedataobjectshould

beinitializedondocumentload.name (Requiredattribute)Theuniquenameforthedataobject.schema (Optionalattribute)ThenameofanXMLSchemafile.query (Requiredelement)Associatesthedataadapterwiththe

dataobjectoraform'sunderlyingXMLdocument.

Page 1959: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedataObjectelementisanoptionalelementofthedataObjectselement.

MultipledataObjectelementsareallowedwithinaform.EachdataobjectisanXMLDocumentObjectModel(DOM)populatedfromanexternaldatasourcethatcanbeaccesseddirectly(byname)fromtheXSLTransformation(XSLT)–basedviewcodeandanyscript-basedbusinesslogiccodeintheform.

Page 1960: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedataObjectelement:

<xsf:dataObjects><xsf:dataObjectname="EmployeeNames"schema="EmployeeNames.xsd"initOnLoad="yes"><xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter> </xsf:query> </xsf:dataObject> </xsf:dataObjects>

Page 1961: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1962: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

dataObjectsElement

DefinesallsecondarydataobjectsusedinaMicrosoftOfficeInfoPath2003form.

Page 1963: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 1964: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptiondataObject (Optionalelement)Definesasecondarydataobjectthatis

usedinanInfoPathform.

Page 1965: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedataObjectselementisanoptionalelementofthexDocumentClasselement.

ThedataObjectselementcontainsacollectionofdataobjectsthatareusedtopopulatevariousXMLDocumentObjectModels(DOMs)fromexternaldatasources.Thesedataobjectscanbeaccesseddirectly(byname)fromtheXSLTransformation(XSLT)–basedviewcodeandanyscript-basedbusinesslogiccodeintheform.

Page 1966: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedataObjectselement:

<xsf:dataObjects><xsf:dataObjectname="EmployeeNames"schema="EmployeeNames.xsd"initOnLoad="yes"><xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter> </xsf:query> </xsf:dataObject> </xsf:dataObjects>

Page 1967: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1968: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

davAdapterElement

ContainsinformationtoenableInfoPathformstobesubmittedtoaserverrunningMicrosoftWindowsSharePointServicesortoaWeb-basedDistributedAuthoringandVersioning(WebDAV)server.

Page 1969: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 1970: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element DescriptionfolderURL ContainstheUniformResourceLocator(URL)oftheserver

towhichthefileissubmitted.fileName ContainsthenameofthefileasaliteralstringorXPath

expression.

Page 1971: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required Description PossibleValuesname xdTitle Yes Thenameof

theadapter.UsedwheninvokingthedavAdapterfromcode.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

overwriteAllowed xdYesNo No Specifieswhethertheadaptercanoverwriteanexistingfile.

yes

no

queryAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforqueryingthedatasource.OmittedforthedavAdapter,correspondingtoadefaultvalueof"no".

yes

no

submitAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.Alwayssetto

yes

no

Page 1972: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

"yes"forthedavAdapter.

Page 1973: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="davAdapter"><xsd:complexType><xsd:all><xsd:elementname="folderURL"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementname="fileName"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element></xsd:all><xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute><xsd:attributename="overwriteAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute><xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute><xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 1974: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1975: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedavAdapterelement:

<xsf:davAdaptername="SubmitToSharePoint"overwriteAllowed="yes"submitAllowed="yes"><xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/><xsf:folderURLvalue="http://some_server/some_doc_lib"/></xsf:davAdapter>

Page 1976: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1977: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

dialogBoxExpressionActionElement

DefinesanXPathexpressiontobedisplayedinadialogbox.

Page 1978: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 1979: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 1980: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 1981: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="dialogBoxExpressionAction"type="xsd:string"></xsd:element>

Page 1982: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedialogBoxExpressionActionelementisachildelementoftheruleelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1983: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedialogBoxExpressionActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 1984: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

dialogBoxMessageActionElement

Definesaliteralmessagetobedisplayedinadialogbox.

Page 1985: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:simpleType

Page 1986: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 1987: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 1988: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="dialogBoxMessageAction"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="1024"/></xsd:restriction></xsd:simpleType></xsd:element>

Page 1989: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedialogBoxMessageActionelementisachildelementoftheruleelement.

Themaximumlengthofthemessageis1,024characters.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 1990: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedialogBoxMessageActionelement:

<<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 1991: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1992: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

documentSchemaElement

DefinesanXMLSchemaforaform.

Page 1993: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 1994: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionlocation (Requiredattribute)ContainsthenamespaceUniform

ResourceIdentifier(URI)andlocation(aUniformResourceLocator(URL),relativetotheformdefinition(.xsf)file),anddelimitedbyawhitespace,ofthe.xsdfiledefiningtheXMLSchema.

rootSchema (Optionalattribute)IdentifiesanXMLSchemaasthetop-levelschemaoftheformbeingfilledout.

Page 1995: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedocumentSchemaelementisarequiredelementofthedocumentSchemaselement.OnedocumentSchemaelementispresentforeachdeclaredXMLSchemaintheform.

MicrosoftOfficeInfoPath2003includesallXMLSchemasintheformtemplateandmodifiestheschemareferencesinthe.xsdfilestoberelativepathnames.Ifaform'sunderlyingXMLdocumentcontainsreferencestomultipleXMLSchemas,theyarelistedwithseparatedocumentSchemaelementsandthetop-levelXMLSchemahasitsrootSchemaattributesetto"yes".

IfanXMLSchemafilecontainsreferencestootherXMLSchemafilesusingtheincludeorimportsettings,thosereferencedfilesdonothavetobelistedinthedocumentSchemaselement.However,theymustbeincludedintheformtemplatewiththeirreferenceschangedtorelativefilenames.

Page 1996: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedocumentSchemaelement:

<xsf:documentSchemas><xsf:documentSchemalocation="urn:schema:custom:NamespacecustomFilename.xsd"rootSchema="yes"/></xsf:documentSchemas>

Page 1997: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 1998: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

documentSchemasElement

DefinestheXMLSchemasthattheMicrosoftOfficeInfoPath2003formisdesignedtohandle.

Page 1999: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2000: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptiondocumentSchema (Requiredelement)DefinesanXMLSchemafora

form.OnedocumentSchemaelementispresentforeachdeclaredXMLSchemaintheform.

Page 2001: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedocumentSchemaselementisanoptionalelementofthexDocumentClasselement.ItdefinesallofthetargetXMLSchemasthatareusedintheform.

Page 2002: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedocumentSchemaselement:

<xsf:documentSchemas><xsf:documentSchemalocation="urn:schema:custom:NamespacecustomFilename.xsd"rootSchema="yes"/></xsf:documentSchemas>

Page 2003: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2004: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

documentSignaturesElement

ContainsthesignedDataBlockelement,whichdefineshowdigitalsignaturesareappliedtoaformorsectionofaform.

Page 2005: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2006: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionsignatureLocation (Optionalattribute)ContainsanXPathexpression

thatpointstotheXMLDOMnodewithintheform'sunderlyingXMLdocumentthatisusedforstoringthedigitalsignature.

Page 2007: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element DescriptionsignedDataBlock Definesanodesetintheform'sunderlyingXML

documenttowhichadigitalsignaturecanbeapplied.

Page 2008: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="documentSignatures"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:signedDataBlock"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="signatureLocation"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="signedDataBlock"> <xsd:complexType> <xsd:sequence> <xsd:elementname="message"type="xsf:xdSignedDataBlockMessage"minOccurs="0"/> </xsd:sequence> <xsd:attributename="name"type="xsf:xdSignedDataBlockName"use="required"/> <xsd:attributename="data"type="xsd:string"use="required"/> <xsd:attributename="signatureLocation"type="xsd:string"use="required"/> <xsd:attributename="mode"type="xsf:xdSignatureRelationEnum"use="required"/> </xsd:complexType> <xsd:uniquename="signedDataBlock_name_unique"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@name"/> </xsd:unique> </xsd:element>

Page 2009: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesignedDataBlockelementisanewXSFelementadditioninMicrosoftOfficeInfoPath2003ServicePack1.Seebelowforbackwardcompatibilityinformationwith1.0formsolutions.

Forbackwardcompatibility,thedocumentsignatureselementdefinesthelocationofthedigitalsignatureXMLDocumentObjectModel(DOM)nodewithintheform'sunderlyingXMLdocument.

ThedocumentSignatureselementisanoptionalelementofthexDocumentClasselement.

Page 2010: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedocumentSignatureselement:

<xsf:documentSignaturessignatureLocation=”my:myfields/my:subtree1|my:myfields/my:subtree2”/>

ThefollowingisanexampleofthedocumentSignatureselementusedinMicrosoftOfficeInfoPath2003ServicePack1:

<xsf:documentSignatures><xsf:signedDataBlockname="main"data="my:myfields/my:subtree1|my:myfields/my:subtree2"signatureLocation="my:mifields/sig:signatures/main"mode="countersign"><xsf:message>Bypressingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

Page 2011: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2012: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

documentVersionUpgradeElement

Defineshowformscreatedwithanolderversionoftheformtemplatecanbeupgradedtothelatestversionoftheformtemplate.

Page 2013: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2014: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionuseScriptHandler (Optionalelement)Specifiesthattheupgradewillbe

handledusingscriptingcode.useTransform (Optionalelement)Specifiesthattheupgradewillbe

handledbyanXSLTransformation(XSLT)suppliedbythenewerversionoftheformtemplate.

Page 2015: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedocumentVersionUpgradeelementisanoptionalelementofthexDocumentClasselement.

Page 2016: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedocumentVersionUpgradeelement:

<xsf:documentVersionUpgrade><xsf:useTransformtransform="upgrade.xsl"minVersionToUpgrade="0.0.0.0"maxVersionToUpgrade="1.0.0.5"/></xsf:documentVersionUpgrade>

Page 2017: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2018: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

domEventHandlerElement

DefinesaneventhandlerforoneormorespecificXMLDocumentObjectModel(DOM)nodes.

Page 2019: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2020: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionhandlerObject (Requiredattribute)Identifiestheuniquenameofthe

eventhandlerinthescriptingcode.match (Requiredattribute)IdentifiestheXMLDOMnodefor

whichtheeventhandlerisdeclared.ValuemustbeavalidXPathexpressionthatidentifiestheXMLnode.

dataObject (Optionalattribute)ContainsthenameofthedataObjecttobeusedintheeventhandler.

NoteUseofthisattributerequiresMicrosoftOfficeInfoPath2003ServicePack1.

Page 2021: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedomEventHandlerelementisanoptionalelementofthedomEventHandlerselement.

Page 2022: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedomEventHandlerelement:

<xsf:domEventHandlers><xsf:domEventHandlermatch="TravelReport/Expenses"handlerObject="TravelExpenses"/></xsf:domEventHandlers>

Page 2023: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2024: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

domEventHandlersElement

Containspointerstovariousscript-basedeventhandlersthatreacttochangesinXMLDocumentObjectModel(DOM)nodesofaform'sunderlyingXMLdocumentwhentheformisbeingfilledout.

Page 2025: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2026: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptiondomEventHandler (Optionalelement)Definesaneventhandlerobject

foroneormorespecificXMLDOMnodes.

Page 2027: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedomEventHandlerselementisanoptionalelementofthexDocumentClasselement.

Page 2028: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedomEventHandlerselement:

<xsf:domEventHandlers><xsf:domEventHandlermatch="TravelReport/Expenses"handlerObject="TravelExpenses"/></xsf:domEventHandlers>

Page 2029: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2030: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

editingElement

Containsinformationabouttheeditingcomponentsusedintheview.

Page 2031: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2032: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionxmlToEdit (Optionalelement)Specifiesaninstanceofanediting

component.

Page 2033: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheeditingelementisanoptionalelementoftheviewelement.

TheeditingcomponentssectionoftheMicrosoftOfficeInfoPath2003formdefinition(.xsf)filedefineshowandwhenusersareabletoeditspecifiedXMLDocumentObjectModel(DOM)nodesofaform'sunderlyingXMLdocument.Onlyoneeditingelementisallowedperview.EacheditingelementcancontainzeroormorexmlToEditelements.

Page 2034: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheeditingelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 2035: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2036: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

editWithElement

Specifiesaninstanceofaneditingcomponent,andprovidesthecorrespondingparameterstodetermineitsexactbehavior.

Page 2037: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2038: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionallowedFileTypes (Optionalattribute)Specifiesthefileextensionsof

filesthatcanbeattachedtotheform.autoComplete (Optionalattribute)Switchestheauto-completionof

fieldsonoroff.caption (Optionalattribute)Specifiesanidentifierfor

alternateformsofXMLdatatobeusedintheeditingcomponent.

component (Requiredattribute)Specifiesthenameoftheeditingcomponentthatwillbereferencedwithintheactionattributeofabuttonelement.

field (Optionalattribute)SpecifiesarelativeXPathexpressionfromtheXMLDocumentObjectModel(DOM)nodespecifiedbytheitemattributeofthexmlToEditelement.

fragmentToInsert (Optionalelement)ContainsalternateversionsofXMLdata(fragments).

proofing (Optionalattribute)Switchestheproofingfeatures,suchasthespellingchecker,onoroff.

removeAncestors (Optionalattribute)Specifiesthenumberofancestor(parent)elementstoberemovedwhenthelastitemisremoved.

type (Optionalattribute)SpecifiesthetypeofeditingforthefieldsthatmatchtheXPathexpressionspecifiedbytheitemattributeofthexmlToEditelement.

widgetIcon (Optionalattribute)Specifieswhetherornotamodifiedwidgeticonwillbeshownforfiltereditems.

useFilter (Optionalattribute)Indicatestheuserwantsafilterwidget.

filterDependency (Optionalattribute)Specifiesautomaticreapplicationofthefilterwhenfilterfieldschange.

Page 2039: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

maxLength (Optionalattribute)Specifiesthemaximumnumberofcharactersallowedfortextboxes.

Page 2040: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheeditWithelementisanoptionalelementofthexmlToEditelement.

IftheviewContextattributeofthexmlToEditelementisdefined,theparametersoftheeditWithelementareassociatedwiththespecifiedviewcontext.

Page 2041: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 2042: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

emailAdapterElement

ContainstheinformationneededtosubmitanInfoPathformasanattachmenttoane-mail,withaspecifiedsetofrecipients,asubject,andanintroduction.

Page 2043: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2044: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element Descriptionto Containsalistofaddresses,separatedby

semicolons,tobeaddedtothetolineofthesubmittede-mail.

cc Containsalistofaddresses,separatedbysemicolons,tobeaddedtothecclineofthesubmittede-mail.

bcc Containsalistofaddresses,separatedbysemicolons,tobeaddedtothebcclineofthesubmittede-mail.

subject Containsthesubjectofthesubmittede-mail.intro Containstheintroductionofthesubmittede-mail.attachmentFileName Containsthefilenameoftheattachmenttobe

submittedwiththee-mail.

Page 2045: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required Description PossibleValuesname xdTitle Yes Containsthe

nameoftheemailAdapter.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

queryAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforqueryingthedatasource.OmittedfortheemailAdapter,correspondingtoadefaultvalueof"no".

yes

no

submitAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.Alwayssetto"yes"fortheemailAdapter.

yes

no

Page 2046: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="emailAdapter"><xsd:complexType><xsd:all><xsd:elementname="to"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementname="cc"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementname="bcc"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementname="subject"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementname="intro"minOccurs="0"><xsd:complexType>

Page 2047: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementname="attachmentFileName"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element></xsd:all><xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute><xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute><xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 2048: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2049: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheemailAdapterelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="[email protected]"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="[email protected]"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

Page 2050: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2051: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

errorConditionElement

Definesacustomvalidation(orerrorcondition)foraspecificXMLDocumentObjectModel(DOM)nodeinaform'sunderlyingXMLdocument.

Page 2052: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2053: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionexpression (Requiredattribute)AnXPathexpression(relative

totheexpressionContextattribute,ifspecified)thatmustbeevaluatedtovalidatetheXMLDOMnodespecifiedinthematchattribute.

expressionContext (Optionalattribute)SpecifiestheXMLDOMnodeonwhichtheexpressionspecifiedintheexpressionattributeisrooted.

match (Requiredattribute)IdentifiestheXMLDOMnodesonwhichthecustomvalidationisdeclared.

showErrorOn (Optionalattribute)IdentifiesXMLDOMnodes(withinthecontextoftheexpressioncontextXMLDOMnode)onwhichtheerrorshouldbedisplayedwhentheformisfilledout.

errorMessage (Requiredelement)SpecifiestheerrormessagetobereturnedifthevalueofthespecifiedXMLDOMnodeisconsideredtobeinvalid.

Page 2054: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheerrorConditionelementisanoptionalelementofthecustomValidationelement.

Page 2055: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheerrorConditionelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

Page 2056: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2057: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

errorMessageElement

SpecifiestheerrormessagethatshouldbereturnedifthevalueofthespecifiedXMLDocumentObjectModel(DOM)nodeisconsideredtobeinvalid.

Page 2058: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdErrorMessage

Page 2059: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionshortMessage (Requiredattribute)Identifiestheshorterrormessageto

returnincaseofinvaliddata.type (Optionalattribute)Identifiesthetypeoferrormessage

toreturn.

Page 2060: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheerrorMessageelementisarequiredelementoftheerrorCondition,override,andsubmitelements.

YoucansupplyadetailederrormessageasthevalueoftheerrorMessageelement.Thedetailederrormessageisdisplayedbyclickingtheshortcutmenu'sFullerrordescriptionbuttonwhenerrorinformationisdisplayedandwhentheerrormessagetypeattributeissetto"modal".

Page 2061: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheerrorMessageelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

Page 2062: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2063: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

exitRuleSetElement

AnelementthatstopsfurtherruleprocessingoftheentireruleSet.

Page 2064: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2065: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccurredinthe

form.

Page 2066: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2067: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 2068: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="exitRuleSet"minOccurs="0"><xsd:complexType/></xsd:element>

Page 2069: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheexitRuleSetelementmustbethelastchildelementoftheruleelement.TheruleSetelementprocessingwillbehaltedonlyiftheruleelementisexecuted.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2070: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheexitRuleSetelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 2071: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2072: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

exportToExcelElement

Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstoexporttheformtoaMicrosoftOfficeExcel2003workbook.

Page 2073: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2074: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2075: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

ui xsf:xdEnabledDisabled required SetswhethertheusercanexportthecontentsoftheformtoanExcelworkbook.

enabled

disabled

Page 2076: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="exportToExcel"><xsd:complexType><xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2077: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheexportToExcelelementisanoptionalelementofthefeatureRestrictionselement.Ifthiselementisnotincludedintheformdefinitionfile(.xsf),theusercanusetheform'smenus,toolbars,orkeyboardshortcutstoexporttheformtoanExcelworkbook.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2078: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheexportToExcelelement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

Page 2079: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2080: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

exportToWebElement

Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstoexporttheformtoaWebpage.

Page 2081: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2082: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2083: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

ui xsf:xdEnabledDisabled required SetswhethertheusercanexportthecontentsoftheformtoaWebpage.

enabled

disabled

Page 2084: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="exportToWeb"><xsd:complexType><xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2085: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheexportToWebelementisanoptionalelementofthefeatureRestrictionselement.Ifthiselementisnotincludedintheformdefinitionfile(.xsf),theusercanusetheform'smenus,toolbars,orkeyboardshortcutstoexporttheformtoaWebpage.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2086: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheexportToWebelement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

Page 2087: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2088: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

extensionElement

Containsopencontentmodelinformation.

Page 2089: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2090: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionname (Requiredattribute)Auniquenameidentifyingtheextension

beingspecified.

Page 2091: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheextensionelementisanoptionalelementoftheextensionselement.

NoteUseoftheextensionelementisreserved.MicrosoftOfficeInfoPath2003ignoresanycontentwithintheextensionelement.

Page 2092: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheextensionelement:

<xsf:extensions><xsf:extensionname="someValue"anyAttributesHere="someValue">...opencontentmodelhere...</xsf:extension><xsf:extensions>

Page 2093: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2094: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

extensionsElement

IncludesminorupgradestotheMicrosoftOfficeInfoPath2003formdefinition(.xsf)filethatcanbeusedbyspecificfutureversionsofInfoPathorbyspecificforms.

Page 2095: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2096: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionextension (Optionalelement)Containsopencontentmodelinformation.

Page 2097: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheextensionselementisanoptionalelementofthexDocumentClasselement.

Theextensionselementcontainszeroormoreextensionelements,eachofwhichhasanopencontentmodel.

NoteUseoftheextensionelementisreserved.MicrosoftOfficeInfoPath2003ignoresanycontentwithintheextensionelement.

Page 2098: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheextensionselement:

<xsf:extensions><xsf:extensionname="someValue"anyAttributesHere="someValue">...opencontentmodelhere...</xsf:extension><xsf:extensions>

Page 2099: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2100: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

externalViewElement

DefinesaviewthatcannotbeeditedinMicrosoftOfficeInfoPath.

Page 2101: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2102: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element Descriptionmainpane SpecifiestheXSLTransformation(XSLT)tobeappliedtothe

view.

Page 2103: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required Description PossibleValuesname xsf:xdViewName Yes Containsthe

nameoftheexternalViewelement.

minlength=1

maxlength=255

pattern=([^\p{Z}\p{C}/\\#&"><])(([^\p{Zl}\p{Zp}\p{C}/\\#&"><])*([^\p{Z}\p{C}/\\#&"><]))?

Page 2104: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2105: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="externalView"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:mainpane"/></xsd:sequence><xsd:attributename="name"type="xsf:xdViewName"use="required"/></xsd:complexType></xsd:element>

Page 2106: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheexternalViewelement:

<xsf:externalViews><xsf:externalViewname="SalesDoc"><xsf:mainpanetransform="myWordView.xsl"/></xsf:externalView><xsf:externalViews>

Page 2107: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2108: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

externalViewsElement

ContainsoneormoreexternalViewelements.

Page 2109: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2110: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element DescriptionexternalViewDefinesaviewthatcannotbeeditedinMicrosoftOffice

InfoPath.

Page 2111: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 2112: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="externalViews"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:externalView"minOccurs="1"maxOccurs="unbounded"/></xsd:sequence></xsd:complexType><xsd:uniquename="externalViews_name_unique"><xsd:selectorxpath="./xsf:externalView"/><xsd:fieldxpath="@default"/></xsd:unique><xsd:keyrefname="external_views_printView"refer="xsf:externalView_name_key"><xsd:selectorxpath="."/><xsd:fieldxpath="@default"/></xsd:keyref></xsd:element>

Page 2113: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2114: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheexternalViewselement:

<xsf:externalViews><xsf:externalViewname="SalesDoc"><xsf:mainpanetransform="myWordView.xsl"/></xsf:externalView><xsf:externalViews>

Page 2115: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2116: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

featureRestrictionsElement

Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstosavetheform,exporttheform,printtheform,orsendtheformasane-mailattachment.

Page 2117: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

ChildElements

Element Descriptionsave (Optionalelement)Specifieswhethertheusercanuse

theform'smenus,toolbars,orkeyboardshortcutstosavetheform.

exportToWeb (Optionalelement)Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstoexporttheformtoaWebpage.

exportToExcel (Optionalelement)Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstoexporttheformtoanMicrosoftOfficeExcel2003workbook.

print (Optionalelement)Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstoprinttheform.

sendMail (Optionalelement)Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstosendtheformasane-mailattachment.

autoRecovery (Optionalelement)SpecifieswhethertheformwillsaveAutoRecoverinformationandwhethertheAutoRecoversettingcanbechangedbytheuser.

Page 2118: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 2119: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="featureRestrictions"><xsd:complexType><xsd:all><xsd:elementname="save"minOccurs="0"><xsd:complexType><xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementref="xsf:exportToWeb"minOccurs="0"/><xsd:elementref="xsf:exportToExcel"minOccurs="0"/><xsd:elementref="xsf:print"minOccurs="0"/><xsd:elementref="xsf:sendMail"minOccurs="0"/><xsd:elementref="xsf:autoRecovery"minOccurs="0"/></xsd:all></xsd:complexType></xsd:element>

Page 2120: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksDisablinganyofthefeatureRestrictionselement'schildelementsdoesnotdisabletheuseofformcodetosavetheform,exporttheform,printtheform,orsendtheformasanemailattachment.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2121: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefeatureRestrictionselement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

Page 2122: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2123: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

fieldElement

Definesonefieldforformlibrarycolumns.

Page 2124: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2125: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionaggregation (Optionalattribute)SpecifieshowtheXMLDocument

ObjectModel(DOM)nodesreturnedfromanXPathexpressioninthenodeattributeshouldbeaggregatedtoobtainasinglevalueforthedocument.Caneitherbeanaggregationactionoranindicationoftheparticularelementinthecollection.

columnName (Requiredattribute)IdentifiesthecolumnnameintheSQLtable(underlyingtheformlistview).

maxLength (Optionalattribute)Definesthelengthofthefieldinnumberofbytes.

name (Requiredattribute)Identifiesthefriendlynameofthefieldtobeusedontheformlistview.

node (Requiredattribute)DefinestheXPathexpressionneededtoextractthevalueofthespecifiedpropertyfromtheform'sunderlyingXMLdocument.

required (Optionalattribute)Specifieswhetherthisfieldacceptsnullvalues.

type (Requiredattribute)IdentifiesthestandardXMLSchemadatatype.

viewable (Optionalattribute)Specifieswhetherthisfieldshouldbeaddedtothedefaultview.Possiblevalues"yes"and"no".Thedefaultvalueis"no".

Page 2126: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefieldelementisanoptionalelementofthefieldselement.

Page 2127: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

Page 2128: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

fieldElement(sharepointListAdapterElement)

ContainsfieldmappinginformationforeachfieldinaSharePointlistandthecorrespondingnameusedinInfoPath.

Page 2129: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:ComplexType

Page 2130: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationtoquery

aSharePointlistorlibrary.

Page 2131: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2132: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

sharepointName xsd:string Yes ContainsthenameofafieldinaSharePointlist.

string

infopathName xsd:string Yes ContainsthecorrespondingInfoPathfieldnameforthesharepointName.

string

isLookup xdYesNo No SpecifieswhetherafieldinaSharePointlistisalookupfield.Thedefaultis"no".

yes

no

Page 2133: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="field"minOccurs="0"maxOccurs="unbounded"><xsd:complexType><xsd:attributename="sharepointName"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="infopathName"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="isLookup"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 2134: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksEachfieldreturnedfromaSharePointlistorlibrarybythesharepointListAdapterdataadapterwillhaveafieldelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2135: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefieldelement:

<xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"isLookup="no"></xsf:field>

Page 2136: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

fieldsElement

Definesasetofoneormorefieldelements.

Page 2137: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2138: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionfield (Optionalelement)Definesonefieldforformlibrarycolumns.

Page 2139: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefieldselementisanoptionalelementofthelistPropertieselement.

Page 2140: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefieldselement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

Page 2141: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

fileElement

IdentifiesafileaspartofaMicrosoftOfficeInfoPath2003form.

Page 2142: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2143: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionname (Requiredattribute)Specifiesthenameofthefile.fileProperties (Optionalelement)Definesthepropertiesofafile.

Page 2144: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefileelementisanoptionalelementofthefileselement.

Page 2145: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefileelement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

Page 2146: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2147: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

fileNameElement

SpecifiesthefilenameoranexpressionthatreturnsafilenamewhentheformissubmittedusingthedavAdapter.

Page 2148: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2149: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptiondavAdapter Theparentelementthatcontainsalltheinformation

necessarytosubmitfilestoaserverthatisrunningMicrosoftWindowsSharePointServicesoraWebbasedDistributedAuthoringandVersioning(WebDAV)server.

Page 2150: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes Containsthenameofthefile,oncesubmittedtotheserver.

string

valueType xsf:xdExpressionLiteralNo SpecifieswhetherthenameofthefileshouldbeinterpretedasanXPathexpressionorasaliteralstring.

expression

literal

Page 2151: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="fileName"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 2152: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheextension".xml"isappendedtothefilenameifafilenameextensionisnotspecified.

Thefollowingsystemreservedcharacterswillbereplacedbyanunderscore("_")characterwhenaformissubmitted:

\/:*?"<>|

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2153: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefileNameelement:

<xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/>

Page 2154: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2155: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

fileNewElement

Providesareferencetoan.xmlfilecontainingsampledatatobeloadedwhenauserchoosestocreateanewformbasedontheformtemplate.

Page 2156: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2157: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptioninitialXmlDocument (Requiredelement)Containsareferencetothe

XMLtemplatefilethatisusedforthecreationofanewformbasedontheformtemplate.

Page 2158: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefileNewelementisanoptionalelementofthexDocumentClasselement.

ThefileNewelementoftheMicrosoftOfficeInfoPath2003formdefinition(.xsf)filedefinesthenameandlocationofanXMLtemplatefilethatisusedwhenauserclicksFillOutaFormontheFilemenu.TheXMLtemplatefilecontainsthesampledatathatisloadedwhentheuserchoosestocreateanewformbasedontheformtemplate.

Page 2159: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefileNewelement:

<xsf:fileNew><xsf:initialXmlDocumentcaption="TravelReport"href="TravelReportTemplate.xml"/></xsf:fileNew>

Page 2160: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

filePropertiesElement

Definesthepropertiesofafile.

Page 2161: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2162: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionproperty (Optionalelement)Definesonespecificpropertyforthe

specifiedfile.

Page 2163: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefilePropertieselementisanoptionalelementofthefileelement.

Page 2164: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefilePropertieselement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

Page 2165: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

filesElement

IdentifiesalistoffilesthatareusedbyaMicrosoftOfficeInfoPath2003form.

Page 2166: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2167: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionfile (Optionalelement)IdentifiesafileaspartofanInfoPathform.

Page 2168: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefileselementisarequiredelementofthepackageelement.

Thefileselementmayincludespecificpropertynamesandvaluesforeachfile.

Page 2169: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefileselement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

Page 2170: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2171: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

folderURLElement

SpecifiestheUniformResourceLocator(URL)ofaWeb-basedDistributedAuthoringandVersioning(WebDAV)serveroraserverthatisrunningMicrosoftWindowsSharePointServices.

Page 2172: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2173: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptiondavAdapter Theparentelement,whichcontainsallinformation

necessarytosubmitInfopathformstoaWeb-basedDistributedAuthoringandVersioning(WebDAV)serveroraserverthatisrunningSharePointServices.

Page 2174: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2175: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes TheURLoftheWeb-basedDistributedAuthoringandVersioning(WebDAV)serverortheserverthatisrunningSharePointServices.

string

Page 2176: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="folderURL"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2177: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheURLmustbeginwith"http://"or"https://".Othercommonprotocolswillcauseanerror.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2178: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefolderURLelement:

<folderURLvalue="http://some_server/some_doc_lib"/>

Page 2179: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

footerElement

Specifiesthefootertext.

Page 2180: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:simpleType

Page 2181: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2182: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 2183: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="footer"><xsd:complexTypemixed="true"><xsd:sequence><xsd:anyminOccurs="0"maxOccurs="unbounded"processContents="skip"/></xsd:sequence></xsd:complexType></xsd:element>

Page 2184: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefooterelementisachildelementoftheprintSettingselement.Thefootertextshouldnotexceed255characters.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2185: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefooterelement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

Page 2186: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

fragmentToInsertElement

ContainsalternateversionsofXMLdata(fragments).

Page 2187: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2188: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionchooseFragment (Requiredelement)SpecifiesanXMLfragment.

Page 2189: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefragmentToInsertelementisanoptionalelementoftheeditWithelement.

XMLfragmentsaresourcesofXMLdatathatcanbeusedwithinanassociatededitingcomponent.MorethanonechooseFragmentelementcanbedefinedwithinafragmentToInsertelement.

ThefragmentToInsertelementisusedbythexCollection,xOptional,andxReplaceeditingcomponents.

Page 2190: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefragmentToInsertelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 2191: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2192: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

getUserNameFromDataElement

AllowsusernamestobedeterminedbyanXPathqueryintothedatainthemaindatasourceorasecondarydatasourceandtobeassociatedwitharole.

Page 2193: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2194: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2195: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

dataObject xsd:string No Thenameofthesecondarydatasourcewheretheusernamecanbefound.

string

select xsd:string Yes AnXPathqueryexpressionreturningoneormoredatanodescontainingtheusernames.

string

memberOf xsd:string Yes SpecifiestheroletobeassociatedwithauserwhoseusernameisreturnedbytheXPathquery.

string

Page 2196: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="getUserNameFromData"><xsd:complexType><xsd:attributename="dataObject"type="xsd:string"use="optional"></xsd:attribute><xsd:attributename="select"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="memberOf"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2197: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2198: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthegetUserNameFromDataelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="Domain\username1"memberOf="A"/><xsf:userNamename="Domain\username2"memberOf="B"/><xsf:groupname="Domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

Page 2199: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

groupElement

Associatesagroupwithaparticularrole.

Page 2200: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2201: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2202: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

name xsd:string Yes Specifiesusersintheformof"domain\groupname"or"groupname".

string

memberOf xsd:string Yes Specifiestheroletobeassociatedwiththegroup.

string

Page 2203: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="group"><xsd:complexType><xsd:attributename="name"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="memberOf"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2204: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUserscanbeassignedrolesthroughgroupingthatcanbemanagedexternally,withoutrequiringaformupdate.GroupscanbesetupthroughtheActiveDirectorydirectoryservice.Permissionsspecifyingwhocanaccessthemembershipinformationcanbesetforgroups.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2205: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthegroupelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="Domain\username1"memberOf="A"/><xsf:userNamename="Domain\username2"memberOf="B"/><xsf:groupname="Domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

Page 2206: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

headerElement

Specifiestheheadertext.

Page 2207: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:simpleType

Page 2208: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2209: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 2210: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="header"><xsd:complexTypemixed="true"><xsd:sequence><xsd:anyminOccurs="0"maxOccurs="unbounded"processContents="skip"/></xsd:sequence></xsd:complexType></xsd:element>

Page 2211: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheheaderelementisachildelementoftheprintSettingselement.Theheadertextshouldnotexceed255characters.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2212: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheheaderelement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

Page 2213: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2214: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

hwsAdapterElement

DefinestheMicrosoftBizTalk2004HumanWorkflowServices(HWS)dataadapter,whichcanbeusedtostartorextendanactivityflowandrespondtoatask.

Page 2215: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2216: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element DescriptionhwsOperation DefinestheHWSoperationtype,suchasaddingan

actiontoanewactivityflow,addinganactiontoanexistingactivityflow,andrespondingtoatask.

Page 2217: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required Description PossibleValuesname xdTitle Yes Containsthe

nameofthedataadapter.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

wsdlUrl xsd:string Yes ContainstheUniformResourceLocator(URL)oftheHWSWebservice.

string

queryAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforqueryingthedatasource.CanbeomittedforthehwsAdapter,correspondingtoadefaultvalueof"no".

yes

no

submitAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforsubmittingtothedata

yes

no

Page 2218: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

source.Alwayssetto"yes"forthehwsAdapter.

Page 2219: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="hwsAdapter"><xsd:complexType><xsd:choice><xsd:elementref="xsf:hwsOperation"/></xsd:choice><xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute><xsd:attributename="wsdlUrl"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute><xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 2220: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUponsubmit,thehwsAdapterautomaticallycreatesagloballyuniqueidentifier(GUID),asrequiredbytheHWSWebservice;encodestheXMLfile;andupdatestheprocessinginstructionsoftheXMLinstancefile.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2221: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthehwsAdapterelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

Page 2222: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 2223: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2224: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

hwsOperationElement

DefinestheMicrosoftBizTalk2004HumanWorkflowServices(HWS)operationtype,suchasaddinganactiontoanewactivityflow,addinganactiontoanexistingactivityflow,andrespondingtoatask.

Page 2225: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2226: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element Descriptioninput SpecifiestheXMLformfile,whichisencodedandsubmitted

withtheHWSoperation.

Page 2227: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required Description PossibleValuestype xsd:string Yes Specifies

theHWSoperationtype.

addActionToNewActivityFlow

addActionToActivityFlow

sendTaskResponse

typeID xsd:string Yes Containsthegloballyuniqueidentifier(GUID)fortheoperation.

string

serviceUrl xsd:string Yes SpecifiestheUniformResourceLocator(URL)locationoftheHWSWebservice.

string

Page 2228: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="hwsOperation"><xsd:complexType><xsd:choice><xsd:elementref="xsf:input"/></xsd:choice><xsd:attributename="type"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="typeID"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="serviceUrl"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2229: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUponsubmit,thehwsAdapterelementautomaticallycreatesagloballyuniqueidentifier(GUID),asrequiredbytheHWSWebservice;encodestheXMLfile;andupdatestheprocessinginstructionsoftheXMLinstancefilewiththenewGUID.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2230: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthehwsOperationelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

Page 2231: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 2232: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2233: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

hwsWorkflowElement

ContainstheinformationtoenabletheWorkflowtaskpaneandtoenableindividualactionsandtasksassociatedwithaMicrosoftBizTalk2004HumanWorkflowServices(HWS)server.

Page 2234: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2235: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element Descriptionlocation (Required)ContainstheUniformResourceLocator

(URL)oftheHWSWebservice.allowedActions ContainstheHWSactionsenabledfortheform.allowedTasks ContainstheHWStasksenabledfortheform.

Page 2236: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

taskpaneVisible xdYesNo No SpecifieswhethertheWorkflowtaskpaneisvisible.Defaultvalueis"yes".

yes

no

Page 2237: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="hwsWorkflow"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:location"minOccurs="1"maxOccurs="1"/><xsd:elementref="xsf:allowedActions"minOccurs="1"maxOccurs="1"/><xsd:elementref="xsf:allowedTasks"minOccurs="0"maxOccurs="1"/></xsd:sequence><xsd:attributename="taskpaneVisible"type="xsf:xdYesNo"></xsd:attribute></xsd:complexType><xsd:uniquename="hws_actiontask_name"><xsd:selectorxpath="./xsf:allowedActions/xsf:action|./xsf:allowedTasks/xsf:task"/><xsd:fieldxpath="@name"/></xsd:unique></xsd:element>

Page 2238: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksForeveryactionandtaskincludedinthehwsWorkflowelement,abuttonisenabledontheWorkflowtaskpane;however,thebuttoneventmustbescriptedmanuallyforeachactionandtask.

InfoPathdoesnotsupportmultipleactionsinaformanddoesnotsupportHWSactivitymodels(predefinedsetsofactions).

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2239: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthehwsWorkflowelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

Page 2240: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2241: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

importParametersElement

Containsalltheparametersthatdefinehowtheimport(merge)formsfeatureworksfortheform.

Page 2242: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2243: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionenabled (Requiredattribute)Specifieswhetherformmerging

isenabledfortheform.importSource (Optionalelement)Specifiesallparameterstobe

usedwhenmergingaformofaspecificXMLSchemaintoadestinationform.

useScriptHandler (Optionalattribute)SpecifieswhethertousetheeventhandlerdefinedfortheOnMergeRequesteventwhenimporting(merging)forms.

Page 2244: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheimportParameterselementisanoptionalelementofthexDocumentClasselement.

Page 2245: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheimportParameterselement:

<xsf:importParametersenabled="yes"useScriptHandler="yes"><xsf:importSourcename="MySource"schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

Page 2246: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2247: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

importSourceElement

SpecifiesallparameterstobeusedwhenmergingaformofaspecificXMLSchemaintoadestinationform.

Page 2248: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2249: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionname (Requiredattribute)Identifiesthenameofthesourceformas

definedintheprocessinginstructionofthatform’sunderlyingXMLdocument.

schema (Requiredattribute)IdentifiestheXMLSchemafilethatshouldbeusedduringthemergeoperationtovalidatetheformbeingmerged.

transform (Requiredattribute)Identifiesthe.xsltfilethatshouldbeusedduringthemergeoperationwhenthesourceform(theonethatisbeingmergedin)matchestheXMLSchemaspecifiedinthecorrespondingschemaattribute.

Page 2250: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheimportSourceelementisanoptionalelementoftheimportParameterselement.

IftheimportSourceelementisnotdefined,thedefault.xsltfileisusedforalltransformationsduringamergeoperation.

Page 2251: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheimportSourceelement:

<xsf:importParametersenabled="yes"<xsf:importSourcename=""schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

Page 2252: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2253: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

initialXmlDocumentElement

ContainsareferencetotheXMLtemplatefilethatisusedforthecreationofanewformbasedontheformtemplate.

Page 2254: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2255: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptioncaption (Requiredattribute)Definesthetextstringtobeused

asthenameoftheformintheTemplateGalleryandinthemostrecentlyusedlist.

customCategory (Optionalelement)SpecifiesthecategorythattheformtemplateappearsunderintheFillOutaFormtaskpane.

href (Requiredattribute)SpecifiestheUniformResourceLocator(URL)oftheXMLtemplatefiletobeusedwhenauserclicksFillOutaFormontheFilemenu.

Page 2256: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheinitialXmlDocumentelementisarequiredelementofthefileNewelement.

Page 2257: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheinitialXmlDocumentelement:

<xsf:fileNew><xsf:initialXmlDocumentcaption="TravelReport"href="TravelReportTemplate.xml"/></xsf:fileNew>

Page 2258: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2259: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

inputElement

ContainsthesubstitutioninformationforpartsoftheinputSimpleObjectAccessProtocol(SOAP)messagetotheWebservice.

Page 2260: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2261: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionsource (Requiredattribute)Containsthenameoftheresource

fileintheformtemplatethatcontainstheXMLSchemafortheinputSOAPmessageoftheselectedoperationoftheWebservice.

partFragment (Optionalelement)DefinesonesubstitutiongroupforaspecificpartoftheinputSOAPmessage.

Page 2262: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheinputelementisanoptionalelementoftheoperationelement.

SpecifiedpartsintheSOAPmessagearereplacedwhentheformtemplateisfilledoutwithdatafromwithintheform.ItisusedwhenasecondarydatasourceispopulatedfromaWebservicecallandMicrosoftOfficeInfoPath2003needssomeinputargumentstomaketheWebservicecalls.

Page 2263: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheinputelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

Page 2264: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 2265: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

introElement

Containstheintroductionforthee-mailmessagewhentheformissubmittedbyusingtheemailAdapterelement.

Page 2266: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2267: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionemailAdapter Parentelementthatcontainstheinformationneededto

submitanInfoPathformasanattachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

Page 2268: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2269: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes Containsthevalueoftheintroelement.

string

Page 2270: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="intro"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2271: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2272: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheintroelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="[email protected]"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="[email protected]"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

Page 2273: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2274: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

listPropertiesElement

Identifiesthepropertiesthatshouldbeonalistviewofallformsbelongingtotheformtemplate.

Page 2275: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2276: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionfields (Optionalelement)Definesasetofoneormorefieldelements.

Page 2277: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThelistPropertieselementisanoptionalelementofthexDocumentClasselement.

XMLdocumentsbelongingtoaformcanbeplacedinasinglefolderorformlibrary.Dependingontheunderlyingsupportinthefilesystemorserver,thisinformationcanbeusedtocreatemeaningfullistviewsonasetofforms.Forexample,whenMicrosoftOfficeInfoPath2003formsaresavedtoaWindowsSharePointServicesformlibrarythatisbasedonanInfoPathformtemplate,formpropertiesspecifiedinthissectionareautomaticallypromotedandmadeavailabletothedefaultviewoftheformlibrary.

Page 2278: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthelistPropertieselement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

Page 2279: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2280: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

locationElement

ContainstheUniformResourceLocator(URL)oftheMicrosoftBizTalk2004HumanWorkflowServices(HWS)Webservice.

Page 2281: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2282: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2283: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

url xsd:string Yes ThelocationoftheHWSWebservice.

string

Page 2284: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="location"><xsd:complexType><xsd:attributename="url"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2285: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThelocationelementisachildelementofthehwsWorkflowelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2286: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthelocationelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

Page 2287: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2288: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

mainpaneElement

Determineswhatisdisplayedinthemainpane.

Page 2289: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2290: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptiontransform (Requiredattribute)SpecifiestherelativeURLtotheXSL

Transformation(XSLT)thatisusedfortheview.

Page 2291: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThemainpaneelementisarequiredelementoftheviewelement.

ThemainpaneelementisanoptionalelementoftheexternalViewelement.

Themainpaneisthemainformarea,asopposedtosecondaryuserinterfaceareassuchasthetaskpane.

Page 2292: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemainpaneelement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

ThefollowingisanexampleofthemainpaneelementusedwithintheexternalViewelement:

<xsf:externalViews><xsf:externalViewname="SalesDoc"><xsf:mainpanetransform="myWordView.xsl"/></xsf:externalView><xsf:externalViews>

Page 2293: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2294: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

masterDetailElement

DefinestheXMLfragmentsthatformamasteranddetailrelationshipinaview'srepeatingtablesorrepeatingsections.

Page 2295: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2296: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2297: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

master xsd:string No ContainstheXPathoftheXMLfragmentthatisboundtoamastertableorsection.

string

masterViewContext xsd:string No SpecifiesastringthatidentifiesanHTMLelementintheview.

string

masterKey xsd:string No ContainstheXPathofthefieldinthemasterXMLfragmentthatformstherelationshiptothedetailXMLfragment.

string

detailKey xsd:string No ContainstheXPathofthefieldinthedetailXMLfragmentthatformstherelationshiptothemasterXMLfragment.

string

Page 2298: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="masterDetail"><xsd:complexType><xsd:attributename="master"type="xsd:string"></xsd:attribute><xsd:attributename="masterViewContext"type="xsd:string"></xsd:attribute><xsd:attributename="masterKey"type="xsd:string"></xsd:attribute><xsd:attributename="detailKey"type="xsd:string"></xsd:attribute></xsd:complexType></xsd:element>

Page 2299: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2300: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemasterDetailelement:

<xsf:editWithcaption="group2"xd:autogeneration="template"component="xCollection"><xsf:masterDetailmasterViewContext="CTRL1_5"master="my:group2"masterKey="my:field1"detailKey="my:field3"></xsf:masterDetail></xsf:editWith>

Page 2301: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2302: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

membershipElement

Associatesauserorgroupofuserswitharole.

Page 2303: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2304: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element DescriptiongetUserNameFromData Allowsusernamestobedeterminedbyan

XPathqueryintothedatainthemaindatasourceorasecondarydatasourceandtobeassociatedwitharole.

userName Definesausertoaparticularrole.group Defineswhichgroupauserbelongsto.

Page 2305: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 2306: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="membership"><xsd:complexType><xsd:choiceminOccurs="1"maxOccurs="unbounded"><xsd:elementref="xsf:getUserNameFromData"/><xsd:elementref="xsf:userName"/><xsd:elementref="xsf:group"/></xsd:choice></xsd:complexType></xsd:element>

Page 2307: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksInfoPathassociatesarolewiththecurrentuserbasedonthemembershiporderintheformdefinitionfile(.xsf).Developerscanmodifythisorderbyhandintheformdefinitionfile.Themembershipelementmustbeachildoftheroleselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2308: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemembershipelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="Domain\username1"memberOf="A"/><xsf:userNamename="Domain\username2"memberOf="B"/><xsf:groupname="Domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

Page 2309: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

menuElement

Containsinformationaboutthecustommenususedintheview.

Page 2310: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2311: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionbutton (Optionalelement)Definesabuttonthathasanassociated

action.caption (Requiredattribute)Usedasthecaptionforamenu.menu (Optionalelement)Containsinformationaboutthemenusused

withinamenu(cascadingmenus).

Page 2312: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThemenuelementisanoptionalelementoftheview,toolbar,andmenuAreaelements.Multiplemenuscanbedeclaredforaform,andeachmenucancontainmultiplemenuorbuttonelements.

NoteTocreatecascadingmenus,amenuelementcanbenestedinsideanothermenuelement.

Page 2313: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemenuelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

Page 2314: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

menuAreaElement

ContainsinformationabouttheMicrosoftOfficeInfoPath2003built-inmenususedintheview.

Page 2315: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2316: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionbutton (Optionalelement)Definesabuttonthathasanassociated

action.name (Requiredattribute)Correspondstooneofthebuilt-inInfoPath

top-levelmenus.menu (Optionalelement)Containsinformationaboutthemenusused

withinthemenuarea.

Page 2317: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThemenuAreaelementisanoptionalelementoftheviewelement.

ThemenuAreaelementisanalogoustothetop-levelmenusfoundinInfoPathwhenfillingoutaform.MultiplebuttonsormenuscanbedeclaredwithinamenuAreaelement.Eachbuttonelementcreatesanadditionalmenuitemwithinthecorrespondingbuilt-inmenu,specifiedbythenameattributeofthemenuAreaelement,andhasanaction(orcommand)associatedwithit.IfamenuelementisnestedwithinamenuAreaelement,thiscreatesacascadingmenuoffofthebuilt-inmenu.

Page 2318: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemenuAreaelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

Page 2319: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

messageElement

Containsthesignatureconfirmationmessagethatisshownwhenasignatureisappliedtotheformorsectionoftheform.

Page 2320: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdSignedDataBlockMessage

ParentElements

Element DescriptionsignedDataBlock Definesanodesetintheform'sunderlyingXML

document,towhichadigitalsignaturecanbeapplied.

Page 2321: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2322: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 2323: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="message"type="xsf:xdSignedDataBlockMessage"minOccurs="0"></xsd:element>

Page 2324: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheconfirmationmessageislimitedto255characters.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2325: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemessageelement:

<xsf:documentSignatures><xsf:signedDataBlockname=”main”data=”my:myfields/my:subtree1|my:myfields/my:subtree2”signatureLocation=”my:mifields/sig:signatures/main”mode=”countersign”><xsf:message>Bypressingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

Page 2326: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2327: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

onLoadElement

ContainsoneruleSetelementthatisinvokedwhentheformisopened.

Page 2328: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2329: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element DescriptionruleSetActionDefinestheruleSetactionelementtobeinvoked.

Page 2330: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 2331: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="onLoad"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:ruleSetAction"minOccurs="1"maxOccurs="1"/></xsd:sequence></xsd:complexType><xsd:keyrefname="load_ruleSetAction"refer="xsf:ruleset_name_key"><xsd:selectorxpath="./xsf:ruleSetAction"/><xsd:fieldxpath="@ruleSet"/></xsd:keyref></xsd:element>

Page 2332: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2333: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheonLoadelement:

<xsf:onLoad><xsf:ruleSetActionruleSet="RuleSet4"/></xsf:onLoad>

Page 2334: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2335: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

openNewDocumentActionElement

Definesaformcreateaction.

Page 2336: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2337: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2338: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

solutionURI xsd:anyURI Yes TheUniformResourceIdentifier(URI)ofthesolutiononwhichthenewformwillbebased.

anyURI

Page 2339: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="openNewDocumentAction"><xsd:complexType><xsd:attributename="solutionURI"type="xsd:anyURI"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2340: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheopenNewDocumentActionelementisachildelementoftheruleelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2341: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheopenNewDocumentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 2342: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2343: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

operationElement

Definestheoperation(method)oftheWebservicetobeusedforretrievingandsubmittingdata.

Page 2344: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2345: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionname (Requiredattribute)ContainstheuniquenameoftheWeb

servicemethod.serviceUrl (Requiredattribute)ContainstheWebserviceUniform

ResourceLocator(URL)towhichtherequestshouldbesent.

soapAction (Requiredattribute)ContainsthevalueoftheSOAPActionattributeintheSimpleObjectAccessProtocol(SOAP)requestmessage.

input (Optionalelement)ContainsthesubstitutioninformationforpartsoftheinputSOAPmessagetotheWebservice.

Page 2346: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheoperationelementisarequiredelementofthewebServiceAdapterelement.

Page 2347: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheoperationelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

Page 2348: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2349: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

overrideElement

DefinesoneoverridingerrormessageforXMLSchemadatatypeerrorsforanindividualXMLDocumentObjectModel(DOM)node.

Page 2350: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2351: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionerrorMessage (Requiredelement)Specifiestheerrormessagethat

shouldbereturnedifthevalueofthespecifiedXMLDOMnodeisconsideredtobeinvalid.

match (Requiredattribute)IdentifiestheXMLDOMnodeforwhichtheerrormessageoverrideisdefined.

Page 2352: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheoverrideelementisanoptionalelementoftheschemaErrorMessageselement.

Page 2353: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheoverrideelement:

<xsf:schemaErrorMessages><xsf:overridematch="/sampleData/number"><xsf:errorMessageshortMessage="InvalidNumber.">Thevalueenteredmustbeavalidnumber.</xsf:errorMessage></xsf:override></xsf:schemaErrorMessages>

Page 2354: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

packageElement

ContainsinformationaboutallofthefilesusedinaMicrosoftOfficeInfoPath2003form.

Page 2355: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2356: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionfiles (Requiredelement)Identifiesalistoffilesthatareusedbyan

InfoPathform.

Page 2357: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThepackageelementisarequiredelementofthexDocumentClasselement.

Page 2358: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthepackageelement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

Page 2359: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2360: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

partFragmentElement

DefinesonesubstitutiongroupforaspecificpartoftheinputSimpleObjectAccessProtocol(SOAP)message.

Page 2361: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2362: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionmatch (Requiredattribute)ContainsanXPathexpressionthat

identifiestheelementsandattributesinsidetheinputSOAPmessagethataretobereplacedatruntime.

replaceWith (Requiredattribute)ContainsanXPathexpressionthatidentifiesthevaluesinthesourcedocumentthatshouldbeusedtoreplacepartsoftheinputSOAPmessage.

sendAsString (Optionalattribute)SpecifiesthatthedataissubmittedasastringthroughthewebServiceAdapterdataadapter.

dataObject (Optionalattribute)SpecifiesthenameofthedataobjecttousewhensubmittingapartFragmentelementtoaMicrosoftBiztalk2004HumanWorkflowServices(HWS)server.

filter (Optionalattribute)SpecifiestheXPathexpressionofthestructuredXMLsubtreewhensubmittingasubsetoftheXMLdata.

Page 2363: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThepartFragmentelementisanoptionalelementoftheinputelement.

MultiplepartFragmentelementsareallowed.

Page 2364: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthepartFragmentelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"><xsf:partFragmentmatch="/dfs:myFields/dfs:dataFields/s0:IsPrime/s0:inValue"replaceWith="/dfs:myFields/dfs:dataFields/s0:IsPrime"/></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

Page 2365: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

permissionsElement

AssertsthepermissionstheInfoPathformrequiresfortheActiveXcontrolsintheview.

Page 2366: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2367: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element DescriptionallowedControl SpecifiestheActiveXcontrolsthatareallowedtobe

instantiated.

Page 2368: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 2369: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="permissions"><xsd:complexType><xsd:choiceminOccurs="0"maxOccurs="unbounded"><xsd:elementref="xsf:allowedControl"/></xsd:choice></xsd:complexType></xsd:element>

Page 2370: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThepermissionselementalsoprovidesinstallationinformationforActiveXcontrolsthatarenotalreadyinstalledontheuser'scomputer.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2371: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthepermissionselement:

<xsf:permissions><xsf:allowedControlcabFile="{84F32C01-78D8-4B93-8ED4-106DA70224C2}.cab”clsid="{84F32C01-78D8-4B93-8ED4-106DA70224C2}"version="1,0,0,1"/><xsf:allowedControlclsid="{F08DF954-8592-11D1-B16A-00C0F0283630}"/></xsf:permissions>

Page 2372: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2373: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

printElement

Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstoprinttheform.

Page 2374: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2375: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2376: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

ui xsf:xdEnabledDisabled Yes Setswhethertheusercanprinttheform.

enabled

disabled

Page 2377: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="print"><xsd:complexType><xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2378: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheprintelementisanoptionalelementofthefeatureRestrictionselement.Ifthiselementisnotincludedintheformdefinitionfile(.xsf),theusercanusetheform'smenus,toolbars,orkeyboardshortcutstoprinttheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2379: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheprintelement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

Page 2380: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

printSettingsElement

Specifiestheprintersettingsusedwhenprintingtheview.

Page 2381: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2382: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionbottomMargin (Optionalattribute)Specifiesthebottom

margin.collate (Optionalattribute)Specifieswhetherthepaper

iscollated.copies (Optionalattribute)Specifiesthenumberof

copies.footer (Optionalattribute)Specifiesthefootertext.header (Optionalattribute)Specifiestheheadertext.leftMargin (Optionalattribute)Specifiestheleftmargin.marginUnitsType (Optionalattribute)Specifiesthemarginunit

size.orientation (Optionalattribute)Specifiestheorientation.pageRangeEnd (Optionalattribute)Specifiesthelastpageto

beprinted.pageRangeStart (Optionalattribute)Specifiesthefirstpageto

beprinted.paperSize (Optionalattribute)Specifiesthesizeofthe

paper.paperSource (Optionalattribute)Specifiesthesourceofthe

paper.printerName (Optionalattribute)Specifiesthenameofthe

printer.printerSpecificSettings (Optionalattribute)Specifiesprinterspecific

settings.rightMargin (Optionalattribute)Specifiestherightmargin.topMargin (Optionalattribute)Specifiesthetopmargin.

Page 2383: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheprintSettingselementisanoptionalelementoftheviewelement.

Page 2384: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

Page 2385: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2386: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

propertyElement

Definesonespecificpropertyforthespecifiedfile.

Page 2387: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2388: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionname (Requiredattribute)Definesthenameoftheproperty.type (Requiredattribute)Definesthetypeoftheproperty.value (Requiredattribute)Forsimpleproperties,specifiesavaluefor

theproperty.Forcomplexandmulti-valuedproperties,thespecifiedvalueisdefinedasacontainerXMLtreeusinganopencontentmodel.

Page 2389: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThepropertyelementisanoptionalelementofthefilePropertieselement.

Page 2390: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthepropertyelement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

Page 2391: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2392: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

queryElement

Associatesadataadapterwithadataobjectoraform'sunderlyingXMLdocument.

Page 2393: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2394: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionadoAdapter (Optionalelement)DefinesanActiveXData

Objects(ADO)dataadapterthatretrievesdatafromanADOdatasourceforthespecifieddataobject.

webServiceAdapter (Optionalelement)DefinesaWebservicedataadapterthatretrievesdatafromaWebserviceforthespecifieddataobject.

xmlFileAdapter (Optionalelement)Definesan.xmlfiledataadapterthatretrievesdatafroman.xmlfileforthespecifieddataobject.

queryAction (Optionalelement)Definesadataconnectionqueryaction.

sharepointListAdapter (Optionalelement)ContainsthedataadapterinformationtoqueryaSharePointlistorlibrary.

Page 2395: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThequeryelementisanoptionalelementofthexDocumentClasselementandthedataObjectelement.

Onlyonedataadaptercanbespecifiedinthequeryelement.

Page 2396: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthequeryelement:

<xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

Page 2397: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2398: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

queryElement(dataObjectElement)

Associatesadataadapterwithadataobject.

Page 2399: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2400: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptiondataObject DefinesasecondarydataobjectthatisusedinaMicrosoft

OfficeInfoPathform.

Page 2401: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element DescriptionadoAdapter (Optionalelement)DefinesanActiveXData

Objects(ADO)dataadapterthatretrievesdatafromanADOdatasourceforthespecifieddataobject.

webServiceAdapter (Optionalelement)DefinesaWebservicedataadapterthatretrievesdatafromaWebserviceforthespecifieddataobject.

xmlFileAdapter (Optionalelement)Definesan.xmlfiledataadapterthatretrievesdatafroman.xmlfileforthespecifieddataobject.

sharepointListAdapter (Optionalelement)ContainsthedataadapterinformationtoqueryaSharePointlistorlibrary.

Page 2402: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 2403: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="query"><xsd:complexType><xsd:choice><xsd:elementref="xsf:adoAdapter"/><xsd:elementref="xsf:webServiceAdapter"/><xsd:elementref="xsf:xmlFileAdapter"/><xsd:elementref="xsf:sharepointListAdapter"/></xsd:choice></xsd:complexType></xsd:element>

Page 2404: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2405: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthequeryelement:

<xsf:dataObjects><xsf:dataObjectname="EmployeeNames"schema="EmployeeNames.xsd"initOnLoad="yes"><xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query></xsf:dataObject></xsf:dataObjects>

Page 2406: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

queryActionElement

Definesadataconnectionqueryaction.

Page 2407: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2408: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2409: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

adapter xsd:string Yes Containsthenameofthedataadaptertoquery.

string

Page 2410: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="queryAction"><xsd:complexType><xsd:attributename="adapter"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2411: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThequeryActionelementisachildelementoftheruleelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2412: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthequeryActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 2413: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2414: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

roleElement

Definesrole.

Page 2415: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2416: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2417: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required Description PossibleValuesname xdRoleName Yes Usedto

identifytherole.

SamerestrictionasxdViewName.

Page 2418: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="role"><xsd:complexType><xsd:attributename="name"type="xsf:xdRoleName"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2419: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksEachtimearoleiscreatedforaform,acorrespondingroleelementiscreatedintheformdefinitionfile(.xsf).Youcanassignuserstorolesbyusingusernames,groups,andXPathusernames.Userscanbeselectedforrolesinoneoffourways:

Initiator—rolefornewdocuments.

Username—NTdomainusers(intranetortrustedonly).

XPathusername—usernamesstoredinXMLdata(intranetortrustedonly).

Group—ActiveDirectorydirectoryservicegroups(intranetortrustedonly).

InfoPathmakestheuserassignmentbyfollowingthemembershiporderintheformdefinitionfile.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2420: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheroleelement:

<rolesinitiator=”xsd:string”default=”xsd:string”hideStatusBarDisplay="xsf:xdYesNo"><rolename=”xsf:xdRoleName”/><membership><getUserNameFromDatadataObject=”xsd:string”select=”xsd:string”memberOf=”xsd:string”/><userNamename=”xsd:string”memberOf=”xsd:string”/><userNamename=”xsd:string”memberOf=”xsd:string”/><groupname=”xsd:string”memberOf=”xsd:string”/></membership></roles>

Page 2421: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

rolesElement

Definesroles.

Page 2422: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2423: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element Descriptionrole Definesrole.membershipMapsauserorgroupofuserstoarole.

Page 2424: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

default xsd:string Yes Specifiesthenameidentifieroftherolethatisthedefaultrole.

string

initiator xsd:string No Specifiesthenameidentifieroftherolechosentobetheinitiatorrole.

string

hideStatusBarDisplay xdYesNo No Specifieswhetherthecurrentroleshouldbedisplayedinthestatusbar.

yes

no

Page 2425: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="roles"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:role"minOccurs="1"maxOccurs="unbounded"/><xsd:elementref="xsf:membership"minOccurs="0"maxOccurs="1"/></xsd:sequence><xsd:attributename="default"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="initiator"type="xsd:string"use="optional"></xsd:attribute><xsd:attributename="hideStatusBarDisplay"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType><!--rolenamesmustbeunique--><xsd:uniquename="roles_name_unique"><xsd:selectorxpath="./xsf:role"/><xsd:fieldxpath="@name"/></xsd:unique><!--fieldsmustreferenceexistingrole--><xsd:keyname="role_name_key"><xsd:selectorxpath="./xsf:role"/><xsd:fieldxpath="@name"/></xsd:key><xsd:keyrefname="role_default"refer="xsf:role_name_key"><xsd:selectorxpath="."/><xsd:fieldxpath="@default"/></xsd:keyref><xsd:keyrefname="role_initiator"refer="xsf:role_name_key"><xsd:selectorxpath="."/><xsd:fieldxpath="@initiator"/></xsd:keyref><xsd:keyrefname="role_membership"refer="xsf:role_name_key">

Page 2426: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsd:selectorxpath="./xsf:membership/*"/><xsd:fieldxpath="@memberOf"/></xsd:keyref></xsd:element>

Page 2427: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2428: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheroleselement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="Domain\username1"memberOf="A"/><xsf:userNamename="Domain\username2"memberOf="B"/><xsf:groupname="Domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

Page 2429: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2430: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ruleElement

Definesanactioninvokedafteraneventhasoccurredintheform.

Page 2431: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2432: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element DescriptionassignmentAction Definesanactiontosetthevalueofa

field.closeDocumentAction Definesaformcloseaction.dialogBoxExpressionAction DefinesanXPathexpressiontobe

displayedinadialogbox.dialogBoxMessageAction Definesaliteralmessagetobedisplayed

inadialogbox.exitRuleSet Anelementwhich,ifpresentattheendof

therule,stopsfurtherruleprocessingoftheentireruleSetwhentheruleisexecuted.

openNewDocumentAction Definesaformcreateaction.queryAction Definesadataconnectionqueryaction.submitAction Definesaformsubmitaction.switchViewAction Definesaviewswitchaction.

Page 2433: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

caption xsd:string Yes Containsthenameoftheruleasitappearsintheuserinterface.

string

condition xsd:string No DefinestheXPathexpression,evaluatedasaBooleanvalue,thatdetermineswhethertheassociatedactionwillbeinvoked.

string

isEnabled xdYesNo No Specifieswhethertheruleisenabledfortheform.Thedefaultvalueis"yes".

yes

no

Page 2434: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="rule"><xsd:complexType><xsd:sequence><xsd:choiceminOccurs="0"maxOccurs="unbounded"><xsd:elementref="xsf:dialogBoxMessageAction"/><xsd:elementref="xsf:dialogBoxExpressionAction"/><xsd:elementref="xsf:switchViewAction"/><xsd:elementref="xsf:assignmentAction"/><xsd:elementref="xsf:queryAction"/><xsd:elementname="submitAction"><xsd:complexType><xsd:attributename="adapter"type="xsf:xdTitle"use="required"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementref="xsf:openNewDocumentAction"/><xsd:elementref="xsf:closeDocumentAction"/></xsd:choice><xsd:elementname="exitRuleSet"minOccurs="0"><xsd:complexType/></xsd:element></xsd:sequence><xsd:attributename="caption"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="condition"type="xsd:string"use="optional"></xsd:attribute><xsd:attributename="isEnabled"type="xsf:xdYesNo"use="optional"default="yes"></xsd:attribute></xsd:complexType></xsd:element>

Page 2435: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2436: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheruleelement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

Page 2437: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2438: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ruleSetElement

Containsoneormoreruleelements.

Page 2439: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2440: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccurredinthe

form.

Page 2441: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

name xsd:string Yes ContainsthenameoftheruleSetelement.

string

Page 2442: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="ruleSet"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:rule"minOccurs="1"maxOccurs="unbounded"/></xsd:sequence><xsd:attributename="name"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2443: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2444: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheruleSetelement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

Page 2445: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ruleSetActionElement

DefinestheruleSetactionelementtobeinvoked.

Page 2446: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2447: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2448: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

ruleSet xsd:string Yes ContainsthenameoftheruleSettobeinvoked.

string

Page 2449: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="ruleSetAction"><xsd:complexType><xsd:attributename="ruleSet"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2450: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheruleSetActionelementisachildofthesubmit,domEventHandler,onLoad,andbuttonelements.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2451: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheruleSetActionelement:

<xsf:onLoad><xsf:ruleSetActionruleSet="RuleSet4"/></xsf:onLoad>

Page 2452: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ruleSetsElement

ContainsoneormoreruleSetelements.

Page 2453: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2454: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element DescriptionruleSet Containsoneormoreruleelements.

Page 2455: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 2456: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="ruleSets"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:ruleSet"minOccurs="0"maxOccurs="unbounded"/></xsd:sequence></xsd:complexType><xsd:uniquename="ruleSets_name_unique"><xsd:selectorxpath="./xsf:ruleSet"/><xsd:fieldxpath="@name"/></xsd:unique></xsd:element>

Page 2457: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheruleSetselementisanoptionalelementofthexDocumentClasselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2458: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheruleSetselement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

Page 2459: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2460: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

saveElement

ShowswhethertheSaveusingcustomcodecheckboxoptionisenabled.

Page 2461: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2462: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element DescriptionuseScriptHandler Specifiesthatthesubmit,save,orversionupgrade

operationwillbehandledusingformcode.

Page 2463: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

AttributesNone.

Page 2464: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="save"><xsd:complexType><xsd:choiceminOccurs="0"maxOccurs="1"><xsd:elementref="xsf:useScriptHandler"/></xsd:choice></xsd:complexType></xsd:element>

Page 2465: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheSaveusingcustomcodecheckboxoptionisenabled,the<xsf:save><xsf:useScriptHandler/></xsf:save>elementswillbeaddedtotheformdefinitionfile(.xsf)asachildofthexDocumentClasselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2466: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesaveelement:

<xsf:save><xsf:useScriptHandler/></xsf:save>

Page 2467: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2468: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

saveElement(featureRestrictionsElement)

Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstosavetheform.

Page 2469: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2470: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionfeatureRestrictions Specifieswhethertheusercanusetheform's

menus,toolbars,orkeyboardshortcutstosavetheform,exporttheform,printtheform,orsendtheformasane-mailattachment.

Page 2471: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

ui xsf:xdEnabledDisabled Yes Setswhethertheusercansavetheform.

enabled

disabled

Page 2472: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="save"minOccurs="0"><xsd:complexType><xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2473: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesaveelementisanoptionalelementofthefeatureRestrictionselement.Ifthiselementisnotincludedintheformdefinitionfile(.xsf),thentheusercanusetheform'smenus,toolbars,orkeyboardshortcutstosavetheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2474: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesaveelement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

Page 2475: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2476: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

schemaErrorMessagesElement

ContainscustomerrormessagesusedtooverrideXMLSchemadatatypeerrors.

Page 2477: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2478: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionoverride (Optionalelement)Definesoneoverridingerrormessagefor

XMLSchemadatatypeerrorsforanindividualXMLDocumentObjectModel(DOM)node.

Page 2479: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheschemaErrorMessageselementisanoptionalelementofthexDocumentClasselement.

Page 2480: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheschemaErrorMessageselement:

<xsf:schemaErrorMessages><xsf:overridematch="/sampleData/number"><xsf:errorMessageshortMessage="InvalidNumber.">Thevalueenteredmustbeavalidnumber.</xsf:errorMessage></xsf:override></xsf:schemaErrorMessages>

Page 2481: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2482: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

scriptElement

Definesthesourcescriptingfilecontainingallthedata-levelscriptcontentreferencedintheform.

Page 2483: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2484: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionsrc (Requiredattribute)ProvidesarelativeURLwithintheform

templatetothespecifiedscriptsourcefile.

Page 2485: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThescriptelementisanoptionalelementofthescriptselement.

Page 2486: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthescriptelement:

<xsf:scriptslanguage="jscript"><xsf:scriptsrc="myscripts.js"/></xsf:scripts>

Page 2487: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2488: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

scriptsElement

Definesthesourceofallbusinesslogicscriptsusedatthedocumentlevelintheform.

Page 2489: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2490: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionlanguage (Requiredattribute)Definesthescriptlanguage

usedinthebusinesslogicsourcefiles.script (Optionalelement)Definesthesourcescripting

filecontainingallthedata-levelscriptcontentreferencedintheform.

enforceScriptTimeout (Optionalelement)Specifieswhethertoenableordisableatime-outperiodforscripts.

Page 2491: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThescriptselementisanoptionalelementofthexDocumentClasselement.

Therecanpotentiallybemorethanonescriptelementinthescriptselement;however,theyshouldallbewritteninthesamescriptinglanguage.Alldefinedscriptsourcesareconcatenatedandloadedintoasinglescriptengineenvironmentwhentheformisbeingfilledout.Thismeansthatduplicatefunctionsandpropertynamesareresolvedbydefaultbythescriptengine,andthelastdeclarationistheonethatisused.Formdevelopersmustensureuniquenamesacrossscriptingsourcefilesthatareusedinaform.

Inordertoaddencodedjscriptfilestoaform,youneedtoedittheformdefinitionfile(.xsf)tochangethelanguagepropertyinthescriptselement.Afterthepropertyhasbeenupdated,thescriptssectioninthe.xsffilewilllooklikethefollowing:

<xsf:scriptslanguage="jscript.encode"> <xsf:scriptsrc="scriptenc.js"></xsf:script></xsf:scripts>

Thescriptselementisnotpresentinthe.xsffileiftheformusesmanagedcode.

Page 2492: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthescriptselement:

<xsf:scriptslanguage="jscript"enforceScriptTimeout="no"><xsf:scriptsrc="internal.js"/><xsf:scriptsrc="script.js"/></xsf:scripts>

Page 2493: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2494: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

sendMailElement

Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstosendtheformasanemailattachment.

Page 2495: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2496: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2497: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

ui xdEnabledDisabled required Setswhethertheusercansendtheformasanemailattachment.

enabled

disabled

Page 2498: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="sendMail"><xsd:complexType><xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2499: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesendMailelementisanoptionalelementofthefeatureRestrictionselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2500: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesendMailelement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

Page 2501: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2502: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

sharepointListAdapterElement

ContainsthedataadapterinformationtoqueryaSharePointlistorlibrary.

Page 2503: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2504: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element Descriptionfield Containsfieldmappinginformationforeachfieldina

SharePointlistandthecorrespondingnameusedinMicrosoftOfficeInfoPath2003ServicePack1.

Page 2505: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required Description PossibleValuesname xdTitle Yes Containsthenameof

thesharepointListAdapterandisusedasthesecondarydatasourcename.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

siteUrl xsd:string Yes ContainstheUniformResourceLocator(URL)oftheSharePointsite.

string

sharepointGuid xsd:string Yes ContainstheGUIDoftheSharePointlist.

string

infopathGroup xsd:string Yes ContainsthenameofthegroupunderwhichallfieldsintheSharePointlistwillbestored.

string

queryAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforqueryingthedatasource.Alwayssetto"yes"forthesharepointListAdapter.

yes

no

submitAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.OmittedforthesharepointListAdapter,correspondingtoadefaultvalueof"no".

yes

no

Page 2506: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="sharepointListAdapter"><xsd:complexType><xsd:sequence><xsd:elementname="field"minOccurs="0"maxOccurs="unbounded"><xsd:complexType><xsd:attributename="sharepointName"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="infopathName"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="isLookup"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element></xsd:sequence><xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute><xsd:attributename="siteUrl"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="sharepointGuid"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="infopathGroup"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute><xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 2507: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksEachfieldintheSharePointlistthatisreturnedbythedataadapterwillhaveafieldelement.ThesharepointListAdaptercanonlybeusedasasecondarydatasourceanddoesnotsupportasubmitaction.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2508: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl=”http://xyzco/reports/”sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="XyzReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

Page 2509: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2510: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

signedDataBlockElement

Definesanodesetintheform'sunderlyingXMLdocumenttowhichadigitalsignaturecanbeapplied.

Page 2511: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2512: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElements

Element Descriptionmessage Thesignatureconfirmationmessageshownwhenadigital

signatureisappliedtotheformortoasectionoftheform.

Page 2513: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required Descriptionname xdSignedDataBlockName Yes Containsthe

nameofthesignedDataBlockelement.

data xsd:string Yes ContainsanXPathmatchexpressionthatdefinesthenodesettowhichthesignaturewillbeapplied.

signatureLocation xsd:string Yes ContainsanXPathexpressionthatpointstotheXMLDocumentObjectModel(DOM)nodewithintheform'sunderlyingXMLdocumentthatisusedforstoringthedigitalsignature.

mode xdSignatureRelationEnum Yes SpecifiesthesignaturerelationshipforthesignedDatablockelement.Thedefaultis"single".

Page 2514: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="signedDataBlock"><xsd:complexType><xsd:sequence><xsd:elementname="message"type="xsf:xdSignedDataBlockMessage"minOccurs="0"></xsd:element></xsd:sequence><xsd:attributename="name"type="xsf:xdSignedDataBlockName"use="required"></xsd:attribute><xsd:attributename="data"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="signatureLocation"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="mode"type="xsf:xdSignatureRelationEnum"use="required"></xsd:attribute></xsd:complexType><xsd:uniquename="signedDataBlock_name_unique"><xsd:selectorxpath="."/><xsd:fieldxpath="@name"/></xsd:unique></xsd:element>

Page 2515: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenodesetmustbetheunionofconnectedsubtrees.IfanonleafnodeisincludedinasignedDataBlock,thenallchildrenmustbeincluded.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2516: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesignedDataBlockelement:

<xsf:documentSignatures><xsf:signedDataBlockname=”main”data=”my:myfields/my:subtree1|my:myfields/my:subtree2”signatureLocation=”my:mifields/sig:signatures/main”mode=”countersign”><xsf:message>Bypressingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

Page 2517: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2518: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

solutionPropertiesElement

Containsdesign-timeinformationaboutaMicrosoftOfficeInfoPath2003form.

Page 2519: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2520: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionallowCustomization (Optionalattribute)Indicateswhether

theformcanbemodifiedorcustomized.automaticallyCreateNodes (Optionalattribute)Indicateswhether

XMLDocumentObjectModel(DOM)nodeswillbeautomaticallygeneratedwhencontrolsareinsertedintheviewindesignmode.

fullyEditableNamespace (Optionalattribute)IdentifiesthenamespaceofanXMLSchemaintheformtemplatethatcanbeentirelymodifiedinInfoPathdesignmode.

lastOpenView (Optionalattribute)IdentifiesthenameoftheviewthatwaslastopeninInfoPathwhendesigningaform.

lastVersionNeedingTransform (Optionalattribute)Identifies,temporarily,thevalueofthemaxToVersionUpgradeattributeinthedocumentVersionUpgradeelementforupgradewithan.xsltfileifscriptingcodeisbeingusedfortheupgrade.

scriptLanguage (Optionalattribute)Identifiesthenameofthescriptinglanguageusedtoimplementthebusinesslogicoftheform.

publishSaveUrl (Optionalattribute)ContainsthelocationofthesavedformtemplateifdifferentfromthevalueofthepublishUrlattribute.

Page 2521: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesolutionPropertieselementisanoptionalelementoftheapplicationParameterselement.

Page 2522: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:names?pace1:mynames"/></xsf:applicationParameters>

Page 2523: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2524: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

subjectElement

Containsthesubjectlineofthee-mailmessagewhentheformissubmittedusingtheemailAdapterelement.

Page 2525: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2526: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionemailAdapter Parentelementthatcontainstheinformationneededto

submitanInfoPathformasanattachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

Page 2527: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2528: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes Containsthevalueofthesubjectelement.

string

valueType xdExpressionLiteral No SpecifieswhetherthevalueattributeisinterpretedasanXPathexpressionoraliteralstring.

expression

literal

Page 2529: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="subject"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 2530: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2531: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesubjectelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="[email protected]"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="[email protected]"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

Page 2532: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2533: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

submitElement

Containsinformationaboutthesubmissionfunctionalityofaform.

Page 2534: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2535: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptioncaption (Optionalattribute)Definesthenameofthe

submitbuttonandcorrespondingmenuitemthatwillappearontheFilemenuwhenauserisfillingouttheform.

disableMenuItem (Optionalattribute)Specifieswhetherthemenuitemforthesubmitoperationshouldbedisabled.

errorMessage (Optionalelement)Specifiesthetexttobeusedintheerrormessage.IftheshowStatusDialogattributeofthesubmitelementissetto"no",thiselementwillbeignored.

onAfterSubmit (Optionalattribute)Specifieswhethertheformshouldbeclosed,keptopen,orifanewformshouldbecreatedafterasuccessfulsubmission.

showSignatureReminder (Optionalattribute)Specifieswhetheradialogboxshouldbedisplayedtoprompttheusertodigitallysigntheformbeforesubmittingit.

showStatusDialog (Optionalattribute)Specifieswhetherthestatusdialogboxshouldbeshownafterthesubmitoperation.Valuesinclude"yes"and"no".Thedefaultvaluesis"yes".

successMessage (Optionalelement)Specifiesthetexttobeusedtonotifytheuserthatthesubmissionwassuccessful.

useHttpHandler (Optionalelement)SpecifiesthattheformistobesubmittedtothespecifiedUniformResourceLocator(URL)usingthespecifiedHTTPmethod.

useScriptHandler (Optionalelement)Specifiesthattheformis

Page 2536: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

tobesubmittedbyscriptingcodeintheassociatedscriptfile.SubmitcodemustbewrittenintheOnSubmitRequesteventhandlerintheform'sprimaryscriptingfile.

useQueryAdapter (Optionalelement)Specifiesthattheformistobesubmittedtothesamedataadapterasspecifiedinthequeryelement.

webServiceAdapter (Optionalelement)SpecifiesthattheformistobesubmittedtoaWebserviceadapter.

submitAction (Optionalelement)Specifiesthedataadapterusedtosubmittheform.

Page 2537: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesubmitelementisanoptionalelementofthexDocumentClasselement.

Page 2538: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesubmitelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

Page 2539: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2540: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

submitActionElement(ruleElement)

Definesaformsubmitaction.

Page 2541: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2542: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccurredinthe

form.

Page 2543: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2544: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required Description PossibleValuesadapter xsf:xdTitle Yes Contains

thenameofthedataadaptertosubmit.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

Page 2545: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="submitAction"><xsd:complexType><xsd:attributename="adapter"type="xsf:xdTitle"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2546: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2547: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesubmitActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 2548: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2549: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

submitActionElement(submitElement)

Specifiesthedataadapterusedtosubmittheform.

Page 2550: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2551: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionsubmit Containsinformationaboutthesubmissionfunctionalityofa

form.

Page 2552: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2553: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required Description PossibleValuesadapter xsf:xdTitle Yes Thename

ofthedataadapterusedforsubmittingtheform.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

Page 2554: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="submitAction"minOccurs="0"><xsd:complexType><xsd:attributename="adapter"type="xsf:xdTitle"use="required"></xsd:attribute></xsd:complexType><xsd:keyrefname="submitAdapter_name_keyref"refer="xsf:adapter_name_key"><xsd:selectorxpath="."/><xsd:fieldxpath="@adapter"/></xsd:keyref></xsd:element>

Page 2555: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2556: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesubmitActionelement:

<xsf:submitcaption="Su&bmit"disableMenuItem="no"onAfterSubmit="keepOpen"showStatusDialog="yes"><xsf:submitActionadapter="dav"/></xsf:submit>

<xsf:dataAdapters><xsf:davAdaptername="dav"folderUrl="http://some_server/some_doc_lib"getFileNameFromData="/my:myFields/my:field1"overwriteAllowed="no"></xsf:davAdapter></xsf:dataAdapters>

Page 2557: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

successMessageElement

Specifiesthetexttobeusedtonotifytheuserthatthesubmissionwassuccessful.

Page 2558: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2559: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesuccessMessageelementisanoptionalelementofthesubmitelement.

ThesuccessMessageelementdoesnotcontainanyattributesorchildelements.

ThesuccessMessageelementisignorediftheshowStatusDialogattributeofthesubmitelementissetto"no".

Page 2560: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesuccessMessageelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage<xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

Page 2561: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2562: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

switchViewActionElement

Definesaviewswitchaction.

Page 2563: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2564: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccurredinthe

form.

Page 2565: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2566: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required Description PossibleValuesview xsf:xdViewName Yes Contains

thenameoftheview.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{C}/\\#&"><])(([^\p{Zl}\p{Zp}\p{C}/\\#&"><])*([^\p{Z}\p{C}/\\#&"><]))?

Page 2567: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="switchViewAction"><xsd:complexType> <xsd:attributename="view"type="xsf:xdViewName"use="required"/></xsd:complexType><xsd:keyrefname="switchViewAction_view_keyref"refer="xsf:view_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@view"/></xsd:keyref></xsd:element>

Page 2568: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2569: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheswitchViewActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 2570: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2571: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

taskElement

ContainstheMicrosoftBizTalkServer2004HumanWorkflowServices(HWS)taskinformationenabledfortheform.

Page 2572: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2573: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2574: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

name xsf:xdHWSname Yes Theuniquenameofthetask,asspecifiedintheHWSWorkflowdesigner;usedfortheonClickeventofthebuttonintheHWSWorkflowtaskpane.

Cannotcontainthefollowingcharacters:

\/"[]:<>+=;,?*@

taskTypeID xsd:string Yes TheuniqueIDforthetask.

string

caption xsf:xdHWSCaption No ThelabelforthecorrespondingbuttonintheHWSWorkflowtaskpanetostartorrespondtoatask.

minLength=1

maxLength=255

Page 2575: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="task"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdHWSname"use="required"/> <xsd:attributename="taskTypeID"type="xsd:string"use="required"/> <xsd:attributename="caption"type="xsf:xdHWSCaption"use="optional"/> </xsd:complexType> </xsd:element>

Page 2576: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetaskelementisanoptionalelementoftheallowedTaskselement.

EachtaskenabledfortheformmusthaveacorrespondingtaskelementintheallowedTaskssectionoftheformdefinitionfile(.xsf).

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2577: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetaskelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

Page 2578: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 2579: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2580: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

taskpaneElement

DefinesacustomtaskpanetobeusedinaMicrosoftOfficeInfoPath2003form.

Page 2581: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2582: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptioncaption (Requiredattribute)Definesthecaptionusedinthetaskpane

drop-downlistbox.href (Requiredattribute)SpecifiestherelativeorabsoluteUniform

ResourceLocator(URL)toan.htmlfile.

Page 2583: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetaskpaneelementisanoptionalelementofthexDocumentClasselement.

Thetaskpaneisamodelesspanelthatappearstotherightofthemainformarea.Taskpanescontaincommandsspecifictocompletingtasksthatarerelatedtoasingleform.InfoPathsupportstheuseofasinglecustomtaskpane.

Togetmultipletaskpanebehavior,youcanincludemultiple.htmfilesintheformtemplateandusetheNavigatemethodoftheHTMLTaskPaneobjectintheMicrosoftOfficeInfoPath2003objectmodeltonavigatetodifferent.htmfiles.

Page 2584: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetaskpaneelement:

<xsf:xDocumentClass>...<xsf:taskpanecaption="DesignIssuesHelp"href="DesignIssuesHelp.htm"/>...</xsf:xDocumentClass>

Page 2585: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2586: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

toElement

Containstherecipientinformationforthetolineofthee-mailmessagewhentheformissubmittedusingtheemailAdapterelement.

Page 2587: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2588: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionemailAdapter Parentelementthatcontainstheinformationneededto

submitanInfoPathformasanattachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

Page 2589: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2590: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes Containsthevalueofthetoelement.

string

valueType xsf:xdExpressionLiteralNo SpecifieswhetherthevalueattributeisinterpretedasanXPathexpressionorasaliteralstring.

expression

literal

Page 2591: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="to"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

Page 2592: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksMultipleaddressesonthetolinemustbeseparatedbysemicolons.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2593: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetoelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="[email protected]"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="[email protected]"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

Page 2594: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

toolbarElement

Containsinformationaboutthetoolbarsusedintheview.

Page 2595: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2596: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionbutton (Optionalelement)Definesabuttonthathasanassociated

action.caption (Requiredattribute)Usedasthetitleofthetoolbar,whenthe

toolbarisnotdockedtotheuserinterface.name (Requiredattribute)Identifiesthecorrespondingtoolbarwithin

differentviews.Mustbeuniquewithinagivenview.menu (Optionalelement)Containsinformationaboutthemenusused

withinthetoolbar.

Page 2597: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetoolbarelementisanoptionalelementoftheviewelement.Therecanbemultipletoolbarsdeclaredforaview,andeachtoolbarcanhavemultiplemenuorbuttonelements.

Page 2598: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetoolbarelement:

<xsf:toolbarcaption="CDCollectionToolbar"name="CDCollectionToolbar"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="NewCD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="NewTrack"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="NewLabel"showIf="always"></xsf:button><xsf:menucaption="Remove"><xsf:buttonaction="xCollection::remove"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::remove"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::remove"xmlToEdit="Label_16"caption="Label"showIf="always"></xsf:button></xsf:menu></xsf:toolbar>

Page 2599: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2600: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

unboundControlsElement

Definestheunboundbuttoncontrolsthatareusedintheview.

Page 2601: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2602: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionbutton (Optionalelement)Definesabuttonthathasanassociated

action.

Page 2603: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheunboundControlselementisanoptionalelementoftheviewelement.

UnboundcontrolsinMicrosoftOfficeInfoPath2003arethebuttonsthataredraggedfromtheControlstaskpaneontotheviewindesignmode.Thenameassignedtothebuttoncontrolisusedinthenameattributeofthebuttonelement,andwhenauserclicksonthebutton,thescriptingcodeassociatedwiththebuttonwillbecalled.

Page 2604: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheunboundControlselement:

<xsf:view><xsf:unboundControls><xsf:buttonname="MyButton"></xsf:button></xsf:unboundControls>...</xsf:view>

Thefollowingscripthandler,includedinthescriptfile,willbecalledwhenthebuttonisclicked:

functionMyButton::OnClick(){//Writeyourcodehere.}

Page 2605: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2606: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

useHttpHandlerElement

SpecifiesthattheformistobesubmittedtothespecifiedUniformResourceLocator(URL)usingthespecifiedHTTPmethod.

Page 2607: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2608: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionhref (Requiredattribute)SpecifiestheURLtowhichtheformshould

besubmitted.method (Requiredattribute)SpecifiestheHTTPmethodtouseforthe

submitoperation.

Page 2609: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheuseHttpHandlerelementisanoptionalelementofthesubmitelement.

Page 2610: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheuseHttpHandlerelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useHttpHandler>href="http://MyServer/InfoPathScripts/MyScript.asp"method="POST"</xsf:useHttpHandler><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

Page 2611: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2612: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

useQueryAdapterElement

Specifiesthattheformistobesubmittedtothesamedataadapterasspecifiedinthequeryelement.

Page 2613: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2614: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheuseQueryAdapterelementisanoptionalelementofthesubmitelement.

ThequeryelementusedistheonethatisthechildelementofthexDocumentClasselement,notthequeryelementthatisachildofthedataObjectelement.

TheuseQueryAdapterelementdoesnotcontainanyattributesorchildelements.

Page 2615: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheuseQueryAdapterelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useQueryAdapter/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

Page 2616: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

userNameElement

Associatesauserwithaparticularrole.

Page 2617: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2618: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ChildElementsNone.

Page 2619: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Attributes

Attribute Type Required DescriptionPossibleValues

name xsd:string Yes Specifiesthenameofauserforinclusioninthemembershiplistofarole.

string

memberOf xsd:string Yes Specifiestheroletobeassociatedwiththeuser.

string

Page 2620: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="userName"><xsd:complexType><xsd:attributename="name"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="memberOf"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

Page 2621: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksInfoPathrequiresthatauserbeassociatedwithonlyoneroleatatime.

IfausercreatesanewInfoPathdocumentfromaformtemplate,thatuserisassignedtotherolespecifiedintheoptionalinitiatorattributeoftheroleselement.Ifnorolehasbeendesignatedastheinitiatorrole,InfoPathassignstheusertotherolespecifiedinthememberOfattributeofthefirstentrythatcorrespondstotheuserinthemembershiplistoftheroleselement.Anentryinthemembershiplistcorrespondstoauserifanyoneofthefollowingconditionsistrue:

ThenameoftheusermatchesthevalueofthenameattributeofauserNameelementinthemembershiplist.

Theuserisincludedinagroupidentifiedbyagroupelementinthemembershiplist.

ThenameoftheusermatchesanamereturnedbyagetUserNameFromDataelementinthemembershiplist.

Ifnoentryfortheuserisfoundinthemembershiplist,InfoPathassociatestheuserwiththerolespecifiedinthedefaultattributeoftheroleselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2622: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheuserNameelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="Domain\username1"memberOf="A"/><xsf:userNamename="Domain\username2"memberOf="B"/><xsf:groupname="Domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

Page 2623: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2624: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

useScriptHandlerElement

Specifiesthatthesubmit,save,orversionupgradeoperationwillbehandledusingformcode.

Page 2625: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:element

Page 2626: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheuseScriptHandlerelementisanoptionalelementofthesubmitelement,thesaveelementandthedocumentVersionUpgradeelement.TheuseScriptHandlerelementcontainsnoattributesorchildelements.

Whenusedwiththesubmitelement,itdeclaresthattheformdatawillbeprocessedbyscriptcodeintheassociatedformfile.ThesubmitformcodemustbewrittenintheOnSubmitRequesteventhandlerintheform'sprimaryscriptfile.

Whenusedwiththesaveelement,itdeclaresthatthesaveoperationoftheformdatawillbeprocessedbyformcodeintheassociatedformcodefile.ThecodemustbewrittenintheOnSaveRequesteventhandlerintheform'sprimaryscriptingfile.

WhenusedwiththedocumentVersionUpgradeelement,itdeclaresthattheupgradeofolderforms(createdwithanolderversionoftheformtemplate)willbeprocessedbyformcodeintheassociatedscriptingfile.TheformupgradecodemustbewrittenintheOnVersionUpgradeeventhandlerintheform'sprimaryscriptfile.

Page 2627: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheuseScriptHandlerelement:

<xsf:documentVersionUpgrade><xsf:useScriptHandler/></xsf:documentVersionUpgrade>

Page 2628: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2629: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

useTransformElement

SpecifiesthattheupgradewillbehandledbyanXSLTransformation(XSLT)suppliedbythenewerversionoftheformtemplate.

Page 2630: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2631: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionmaxToVersionUpgrade (Optionalattribute)Inclusivevalueforthelatest

formthatneedstobeupgraded.minVersionToUpgrade (Requiredattribute)Inclusivevalueforthe

oldestformthatcanbeupgraded.transform (Requiredattribute)SpecifiestheXSLTfile

namerelativetotheformtemplate.

Page 2632: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheuseTransformelementisanoptionalelementofthedocumentVersionUpgradeelement.

Whenauserfillsoutaform,MicrosoftOfficeInfoPath2003automaticallyrunsthespecifiedXSLTontheform'sunderlyingXMLdocumentandusestheoutputastheXMLdatatobeedited,iftheversionoftheformisgreaterthanorequaltotheminVersionToUpgradeattributeandtheversionislessthanorequaltothemaxVersionToUpgradeattribute.

Page 2633: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheuseTransformelement:

<xsf:documentVersionUpgrade><xsf:useTransformtransform="upgrade.xsl"minVersionToUpgrade="0.0.0.0"maxVersionToUpgrade="1.0.0.5"/></xsf:documentVersionUpgrade>

Page 2634: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2635: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

viewElement

ContainsinformationaboutaMicrosoftOfficeInfoPath2003view.

Page 2636: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2637: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptioncaption (Optionalattribute)Providesthedisplaycaptionfor

theviewwithintheviewlist.designMode (Optionalattribute)Determineswhethertheviewcan

beopenedindesignmode.editing (Optionalelement)Containsinformationaboutthe

editingcomponentsusedintheview.mainpane (Requiredelement)Determineswhatisdisplayedin

themainpane(formarea).menu (Optionalelement)Containsinformationaboutthe

custommenususedintheview.menuArea (Optionalelement)Containsinformationaboutthe

custommenuitemsthatcanbeaddedtotheInfoPathbuilt-inmenus.

name (Requiredattribute)Identifiestheviewforobjectmodelcallswhenswitchingviews,andforspecifyingthedefaultview.

printSettings (Optionalelement)Specifiestheprintersettingsusedwhenprintingtheview.

printView (Optionalattribute)Specifiesthenameofanotherviewtouseforprintingthisview.

toolbar (Optionalelement)Containsinformationaboutthetoolbarsusedintheview.

unboundControls (Optionalelement)Definestheunboundbuttoncontrolsthatareusedintheview.

showMenuItem (Optionalelement)ProvidesthedisplayofthemenuitemintheViewmenuwithacheckmarkwhenenabled.

Page 2638: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheviewelementisarequiredelementoftheviewselement.

Page 2639: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheviewelement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

Page 2640: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

viewsElement

DefinesalloftheviewsthathavebeenimplementedinaMicrosoftOfficeInfoPath2003form.

Page 2641: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2642: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptiondefault (Optionalattribute)Specifiesthenameoftheviewchosentobe

thedefaultview.view (Requiredelement)ContainsinformationaboutanInfoPathview.

Page 2643: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheviewselementisarequiredelementofthexDocumentClasselement.

Page 2644: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheviewselement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

Page 2645: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2646: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

webServiceAdapterElement

DefinesaWebservicedataadapterthatretrievesdatafromaWebserviceforthespecifieddataobject.

Page 2647: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2648: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionqueryAllowed (Optionalattribute)Specifieswhetherdatacanbe

retrievedfromthedatasourcethroughthequerymethodoftheadapterobject.

submitAllowed (Optionalattribute)Specifieswhetherdatacanbesubmittedtothedatasourcethroughthesubmitmethodoftheadapterobject.

wsdUrl (Requiredattribute)ContainstheUniformResourceLocator(URL)oftheWebServicesDescriptionLanguage(WSDL)filethatdescribestheWebservicespecification.

operation (Requiredelement)Definestheoperation(method)oftheWebservicetobeusedforretrievingandsubmittingdata.

useDataSet (Optionalattribute)SpecifieswhethertheadapterwillsupportanADO.NetDataSet.Defaultis"no".

Page 2649: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThewebServiceAdapterelementisanoptionalelementofthequeryelement.

ThewebServiceAdapterelementcanalsobeusedtodefineaWebserviceadapterusedtosubmitthemainorsecondaryformdata.

Page 2650: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthewebServiceAdapterelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"useDataSet="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

Page 2651: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2652: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xDocumentClassElement

Therootelementoftheformdefinition(.xsf)filefile.Containsallotherelementsandattributesofthe.xsffile.

Page 2653: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2654: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptionauthor (Optionalattribute)Identifiestheauthorof

theform.dataFormSolution (Optionalattribute)Identifiestheformasa

databaseform.description (Optionalattribute)Abriefdescriptionofthe

form.name (Optionalattribute)Providesaunique,

UniformResourceName(URN)–basednamefortheformthatthe.xsffiledefines.

productVersion (Optionalattribute)IdentifiestheversionnumberofInfoPathwithwhichtheformhasbeencreatedorforwhichaparticularformisintended.

publishUrl (Optionalattribute)Identifieswheretheformwaspublishedandwheretheformtemplateshoulddownloadupdatesfrom.

requireFullTrust (Optionalattribute)Allowstheformtorunasafullytrustedformwhenaformtemplateisregisteredorsignedwithacertificate.

solutionFormatVersion (Requiredattribute)Identifiestheversionnumberthatrepresentstheformatofthe.xsffile.

solutionVersion (Optionalattribute)Identifiestheversionnumberoftheform.

xmlns (Requiredattribute)Definesthexsfnamespace.

applicationParameters (Optionalelement)Containsform-specificpropertiesthatdescribehowaformshouldbeusedinInfoPathdesignmode.

customValidation (Optionalelement)Definesrule-basedcustomvalidationontopofallvalidation

Page 2655: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

enforcedthroughtheXMLSchema.dataObjects (Optionalelement)Definesallsecondary

dataobjectsusedinanInfoPathform.documentSchemas (Optionalelement)DefinestheXML

SchemasthattheInfoPathformisdesignedtohandle.

documentSignatures (Optionalelement)DefinesthelocationofthedigitalsignatureXMLDocumentObjectModel(DOM)nodewithintheform'sunderlyingXMLdocument.

documentVersionUpgrade (Optionalelement)Defineshowformscreatedwithanolderversionoftheformtemplatecanbeupgradedtothelatestversionoftheformtemplate.

domEventHandlers (Optionalelement)Containspointerstovariousscript-basedeventhandlersthatreacttochangesinXMLDOMnodesofaform'sunderlyingXMLdocumentwhiletheformisbeingfilledout.

extensions (Optionalelement)IncludesminorupgradestotheInfoPath.xsffilethatcanbeusedbyfuturereleasesofInfoPathorbyspecificforms.

fileNew (Optionalelement)Providesareferencetoan.xmlfilecontainingsampledata,tobeloadedwhenauserchoosestocreateanewformbasedontheformtemplate.

importParameters (Optionalelement)Containsalltheparametersthatdefinehowtheimport(merge)formsfeatureworksfortheform.

listProperties (Optionalelement)Identifiesthepropertiesthatshouldbeonalistviewofallformsbelongingtoaformtemplate.

package (Requiredelement)ContainsinformationaboutallofthefilesusedinanInfoPathform.

Page 2656: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

query (Optionalelement)Associatesadataadapterwiththeform'sunderlyingXMLdocument.

schemaErrorMessages (Optionalelement)ContainscustomerrormessagesusedtooverrideXMLSchemadatatypeerrors.

scripts (Optionalelement)Definesthesourceofallbusinesslogicscriptsusedatthedocumentlevelintheform.

submit (Optionalelement)Containsinformationaboutthesubmissionfunctionalityofaform.

taskpane (Optionalelement)DefinesacustomtaskpanetobeusedinanInfoPathform.

views (Requiredelement)DefinesalloftheviewsthathavebeenimplementedinanInfoPathform.

trustLevel (Optionalattribute)Specifiesthetrustlevelofaform.

trustSetting (Optionalattribute)Specifiesthetrustsettingofaform.

Page 2657: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexDocumentClasselementisarequiredelementandmustbepresentintheInfoPath.xsffile.

TheattributesthatarecontainedwithinthexDocumentClasselementarecollectivelycalledtheglobalmetadatasection.Theglobalmetadatasectionofthe.xsffileisarequiredsectionthatcontainsglobalinformationabouttheInfoPathform.

Page 2658: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthexDocumentClasselement:

xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:schemas-microsoft-com:myTravelReport"author="FrankMiller"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">dataFormSolution="yes"requireFullTrust="yes"trustLevel="restricted"trustSetting="manual"publishUrl="http://www.contoso.com/InfoPathTemplates/MyTemplate.xsn">...</xsf:xDocumentClass

Page 2659: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2660: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xmlFileAdapterElement

Definesan.xmlfiledataadapterthatretrievesdatafroman.xmlfileforthespecifieddataobject.

Page 2661: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2662: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name DescriptionfileUrl (Requiredattribute)ContainstheUniformResourceLocator

(URL)ofthe.xmlfile.name (Optionalattribute)ContainsthenameofthexmlFileAdapter

element.

Page 2663: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexmlFileAdapterelementisanoptionalelementofthequeryelement.

Page 2664: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthexmlFileAdapterelement:

<xsf:query><xsf:xmlFileAdapterfileUrl="currencies.xml"/></xsf:query>

Page 2665: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2666: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xmlToEditElement

Specifiesaninstanceofaneditingcomponent.

Page 2667: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:complexType

Page 2668: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Structure

Name Descriptioncontainer (Optionalattribute)SpecifiesanXPathexpressionthat

determinesthecontextinwhichthecontrolwillbeselectableanditsactionsenabled.

editWith (Optionalelement)Definesaninstanceofaneditingcomponent,andprovidesthecorrespondingparameterstodetermineitsexactbehavior.

item (Requiredattribute)SpecifiesanXPathexpressionthatdeterminestheXMLDocumentObjectModel(DOM)nodestobeeditedusingtheeditingcomponentdefinedintheeditWithelement.

name (Requiredattribute)UsedinthexmlToEditattributeofthebuttonelementtoassociateactionsoftheassociatededitingcomponentwithbuttonsdefinedinmenusandtoolbars.

viewContext (Optionalattribute)SpecifiesastringthatidentifiesanHTMLelementintheview.

Page 2669: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexmlToEditelementisanoptionalelementoftheeditingelement.

xmlToEditelementsareusedtodefinetheeditingcomponentsthatcanbeusedinaform.ThexmlToEditelementscancontainmultipleeditWithelementsthatspecifytheeditingcomponentsthatwillbeusedtoeditvarioustypesofXMLDOMnodes.

Page 2670: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthexmlToEditelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 2671: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

actionAttribute

Specifiesanactionofaneditingcomponent,usingthesyntax"NameOfEditingComponent::NameOfAction".

Page 2672: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 2673: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheactionattributeisanoptionalattributeofthebuttonelement,butisrequiredforbuttonsusedwitheditingcomponents.

Thefollowingaretheeditingactionsthatmaybeusedasthevalueoftheactionattribute.

Name DescriptionxCollection::insert Insertsanitem.xCollection::insertBefore Insertsanitembeforethecurrentselection.xCollection::insertAfter Insertsanitemafterthecurrentselection.xCollection::remove Removesanitem.xCollection::removeAll Removesallitems.xOptional::insert Insertsanoptionalitem.xOptional::remove Removesanoptionalitem.xReplace::replace Replacesanexistingitem.xFileAttachment::attach Opensadialogboxtobrowseforfilestoattach

toaform.xFileAttachment::open Opensafileattachedtoaform.xFileAttachment::saveAs Openstheadialogboxtobrowseforalocation

whereafileistobesaved.xFileAttachment::remove Removesthefilefromtheform.

Page 2674: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheactionattributeasitisusedinthebuttonelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

Page 2675: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2676: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

actionTypeIDAttribute

ContainsauniqueIDfortheactionelement.

Page 2677: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2678: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionaction Containstheinformationforanaction.

Page 2679: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="actionTypeID"type="xsd:string"use="required"></xsd:attribute>

Page 2680: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheactionTypeIDattributeisanattributeoftheactionelement.

ThevalueoftheactionTypeIDattributemustbeuniqueintheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2681: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheactionTypeIDattributeasitisusedintheactionelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

Page 2682: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 2683: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

adapterAttribute(queryActionElement)

ContainstheadapternameforthedataconnectionusedforthequeryActionelement.

Page 2684: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2685: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionqueryAction Definesadataconnectionqueryaction.

Page 2686: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="adapter"type="xsd:string"use="required"></xsd:attribute>

Page 2687: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2688: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheadapterattributeasitisusedinthequeryActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 2689: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2690: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

adapterAttribute(submitActionElement)

Containsthenameofthedataadaptertosubmit.

Page 2691: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdTitle

Page 2692: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsubmitActionDefinesasubmitactionforaform.

Page 2693: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="adapter"type="xsf:xdTitle"use="required"></xsd:attribute>

Page 2694: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2695: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheadapterattributeasitisusedinthesubmitActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 2696: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2697: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

adapterAttribute(submitActionElement)

Containsthenameofthedataadapterusedforsubmittingtheform.

Page 2698: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:complexType

Page 2699: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsubmitAction Specifiesthedataadapterusedtosubmittheform.

Page 2700: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:elementname="submitAction"minOccurs="0"><xsd:complexType><xsd:attributename="adapter"type="xsf:xdTitle"use="required"></xsd:attribute></xsd:complexType><xsd:keyrefname="submitAdapter_name_keyref"refer="xsf:adapter_name_key"><xsd:selectorxpath="."/><xsd:fieldxpath="@adapter"/></xsd:keyref></xsd:element>

Page 2701: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2702: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheadapterattributeasitisusedinthesubmitActionelement:

<xsf:submitcaption="Su&bmit"disableMenuItem="no"onAfterSubmit="keepOpen"showStatusDialog="yes"><xsf:submitActionadapter="dav"/></xsf:submit><xsf:dataAdapters><xsf:davAdaptername="dav"folderUrl="http://some_server/some_doc_lib"getFileNameFromData="/my:myFields/my:field1"overwriteAllowed="no"></xsf:davAdapter></xsf:dataAdapters>

Page 2703: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2704: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

aggregationAttribute

SpecifieshowthenodesreturnedfromanXPathexpressioninthenodeattributeshouldbeaggregatedtoobtainasinglevalueforthedocument.

Page 2705: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:simpleType

Page 2706: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheaggregationattributeisanoptionalattributeofthefieldelement.

Theaggregationattributecaneitherbeanaggregationactionoranindicationoftheparticularelementinthecollection.Itusesthefollowingaggregationactions:sum,count,average,min,max,first,last,merge,andplaintext.

Page 2707: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheaggregationattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

Page 2708: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2709: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

allowCustomizationAttribute

IdentifieswhethertheMicrosoftOfficeInfoPath2003formcanbemodifiedorcustomized.

Page 2710: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 2711: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheallowCustomizationattributeisanoptionalattributeofthesolutionPropertieselement.

IftheallowCustomizationattributeissetto"no",anerrorisgeneratedwhenausertriestomodifytheformtemplateafteropeningitinInfoPath.Allowedvaluesare"yes"and"no".Thedefaultvalueis"yes".

Page 2712: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheallowCustomizationattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

Page 2713: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2714: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

allowedFileTypesattribute

Specifiesthefilenameextensionsoffilesthatcanbeattachedtotheform.

Page 2715: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2716: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptioneditWith Specifiesaninstanceofaneditingcomponent,andprovides

thecorrespondingparameterstodetermineitsexactbehavior.

Page 2717: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="allowedFileTypes"type="xsd:string"use="optional"></xsd:attribute>

Page 2718: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefileextensionslistedintheallowedFileTypesattributevalueareseparatedbycommas.

Page 2719: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Example

<xsf:xmlToEditname="some_name"item="/my:myFields/my:field1"><xsf:editWithallowedFileTypes="doc,xls"component="xFileAttachment"/></xsf:xmlToEdit><menuAreaname="msoStructuralEditingContextMenu"><buttonaction="xFileAttachment::attach"xmlToEdit="some_name"caption="Attach..."showIf="immediate"/><buttonaction="xFileAttachment::open"xmlToEdit="some_name"caption="Open"showIf="immediate"/><buttonaction="xFileAttachment::saveAs"xmlToEdit="some_name"caption="SaveAs..."showIf="immediate"/><buttonaction="xFileAttachment::remove"xmlToEdit="some_name"caption="Deletefile"showIf="immediate"/></menuArea>

Page 2720: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

applicationAttribute

IdentifiesthenameoftheapplicationusedtodesigntheMicrosoftOfficeInfoPath2003form.

Page 2721: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2722: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheapplicationattributeisarequiredattributeoftheapplicationParameterselement.

Theonlyvaluesupportedis"InfoPathDesignMode".

Page 2723: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheapplicationattributeasitisusedintheapplicationParameterselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

Page 2724: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

attributeAttribute

Specifiesthenameoftheattributetobeinserted.

Page 2725: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2726: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheattributeattributeisarequiredattributeoftheattributeDataelement.

Page 2727: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheattributeattributeasitisusedintheattributeDataelement:

<xsf:editWithcomponent="xOptional"><xsf:fragmentToInsert><xsf:chooseFragmentparent="report"><xsf:attributeDataattribute="author"value="authorname"/></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith>

Page 2728: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

authorAttribute

Identifiestheauthoroftheform.

Page 2729: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2730: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheauthorattributeisanoptionalattributeofthexDocumentClasselement.

Page 2731: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheauthorattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

Page 2732: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

autoCompleteAttribute

Switchestheauto-completionoffieldsonoroff.

Page 2733: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 2734: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheautoCompleteattributeisanoptionalattributeoftheeditWithelement.

Valuesinclude"yes"and"no".Thedefaultvalueis"yes".

Page 2735: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheautoCompleteattributeasitisusedintheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"autoComplete="yes"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 2736: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2737: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

automaticallyCreateNodesAttribute

IdentifieswhetherXMLDocumentObjectModel(DOM)nodeswillbeautomaticallygeneratedwhencontrolsareinsertedintheviewindesignmode.

Page 2738: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 2739: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheautomaticallyCreateNodesattributeisanoptionalattributeofthesolutionPropertieselement.

TheautomaticallyCreateNodesattributecorrespondstotheAutomaticallycreatedatasourcecheckboxatthebottomoftheControlstaskpane.

Page 2740: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheautomaticallyCreateNodesattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

Page 2741: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

bottomMarginAttribute

Specifiesthebottommarginwhenprintingaview.

Page 2742: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2743: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThebottomMarginattributeisanoptionalattributeoftheprintSettingselement.

ThebottomMarginattributemustbegreaterthanorequaltozero.

Page 2744: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthebottomMarginattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

Page 2745: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

cabFileAttribute

SpecifiesthenameoftheCABfile.

Page 2746: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2747: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionallowedControl SpecifiestheActiveXcontrolsthatareallowedtobe

instantiated.

Page 2748: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="cabFile"type="xsd:string"use="optional"></xsd:attribute>

Page 2749: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecabFileattributemustrefertoafilewithintheInfoPathpackage.IfthecabFileattributeisnotspecified,thecontrolmustalreadyberegisteredonthelocalcomputerortheformwillnotopen.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2750: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecabFileattributeasitisusedintheallowedControlelement:

<xsf:permissions><xsf:allowedControlcabFile="{84F32C01-78D8-4B93-8ED4-106DA70224C2}.cab”clsid="{84F32C01-78D8-4B93-8ED4-106DA70224C2}"version="1,0,0,1"/><xsf:allowedControlclsid="{F08DF954-8592-11D1-B16A-00C0F0283630}"/></xsf:permissions>

Page 2751: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

canInitiateWorkflowAttribute

Specifieswhethertheactionelementcanbeusedtoinitiateorextendanactivityflow.

Page 2752: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 2753: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionaction Containstheinformationforanaction.

Page 2754: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="canInitiateWorkflow"type="xsf:xdYesNo"use="required"></xsd:attribute>

Page 2755: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecanInitiateWorkflowattributeisarequiredattributeoftheactionelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2756: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecanInitiateWorkflowattributeasitisusedintheactionelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

Page 2757: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 2758: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

captionAttribute(actionElement)

SpecifiesalabelforthebuttonintheWorkflowtaskpanecorrespondingtotheactionelement.

Page 2759: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdHWSCaption

Page 2760: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionaction Containstheinformationforanaction.

Page 2761: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="caption"type="xsf:xdHWSCaption"use="optional"></xsd:attribute>

Page 2762: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecaptionattributeisanoptionalattributeoftheactionelement.

Ifacaptionisnotspecified,thevalueofthenameattributewillbeusedasthecaptionforthebuttonintheWorkflowtaskpane.

Thecaptionattributeisalsousedtoextendanactivityflow.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2763: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecaptionattributeasitisusedintheactionelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

Page 2764: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 2765: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

captionAttribute(buttonElement)

Providesthecaptiondisplayedonthebutton.

Page 2766: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdTitle

Page 2767: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecaptionattributeisanoptionalattributeofthebuttonelement.

Page 2768: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecaptionattributeasitisusedinthebuttonelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

Page 2769: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

captionAttribute(editWithElement)

SpecifiesanidentifierforalternateformsofXMLdatatobeusedintheeditingcomponent.

Page 2770: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdTitle

Page 2771: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecaptionattributeisanoptionalattributeoftheeditWithelement.

Page 2772: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecaptionattributeasitisusedintheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"autoComplete="yes"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 2773: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

captionAttribute(initialXmlDocumentElement)

DefinesthetextstringtobeusedasthenameoftheformintheTemplateGalleryandinthemostrecentlyusedlist.

Page 2774: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdTitle

Page 2775: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecaptionattributeisarequiredattributeoftheinitialXmlDocumentelement.

Ifthisattributeisnotspecified,thenameoftheformisusedasthecaption.Themaximumsizeforthecaptiontextstringis255characters.

Page 2776: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecaptionattributeasitisusedintheinitialXmlDocumentelement:

<xsf:fileNew><xsf:initialXmlDocumentcaption="TravelReport"href="TravelReportTemplate.xml"/></xsf:fileNew>

Page 2777: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

captionAttribute(menuElement)

Usedasthecaptionforamenu.

Page 2778: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdTitle

Page 2779: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecaptionattributeisarequiredattributeofthemenuelement.

Whenusedforamenuthatisnestedwithinaview,thecaptionisthetop-levelmenucaption;whenusedforamenuthatisnestedwithinatoolbar,thecaptionisforthebuttononadrop-downmenu;andwhenusedforamenuthatisnestedinsideanothermenu(cascadingmenu),thecaptionisthesub-menucaption.

Page 2780: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecaptionattributeasitisusedinthemenuelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

Page 2781: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2782: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

captionAttribute(ruleElement)

ContainsthenameofaruleasitappearsinMicrosoftOfficeInfoPath.

Page 2783: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2784: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccuredinthe

form.

Page 2785: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="caption"type="xsd:string"use="required"></xsd:attribute>

Page 2786: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2787: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecaptionattributeasitisusedintheruleelement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

Page 2788: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

captionAttribute(submitElement)

DefinesthenameofthesubmitbuttonandcorrespondingmenuitemthatwillappearontheFilemenuwhenauserisfillingoutaform.

Page 2789: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2790: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecaptionattributeisanoptionalattributeofthesubmitelement.

Thedefaultvalueis"Submit",butanytextstringcanbeused.Ifthecaptionattributeismissingorissettoanemptystring,thedefaultvalueisused.The"&amp;"characterscanbeusedtocreateakeyboardshortcutforthesubmitmenuitem.

Page 2791: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecaptionattributeasitisusedinthesubmitelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

Page 2792: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2793: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

captionAttribute(taskElement)

SpecifiesalabelforthebuttonintheWorkflowtaskpanecorrespondingtothetaskelement.

Page 2794: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdHWSCaption

Page 2795: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptiontask TheHumanWorkflowServices(HWS)taskinformation

enabledfortheform.

Page 2796: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="caption"type="xsf:xdHWSCaption"use="optional"></xsd:attribute>

Page 2797: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecaptionattributeisanoptionalattributeofthetaskelement.

Ifacaptionisnotspecified,thevalueofthenameattributewillbeusedasthecaptionforthebuttonintheWorkflowtaskpane.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2798: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecaptionattributeasitisusedinthetaskelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

Page 2799: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 2800: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

captionAttribute(taskpaneElement)

Definesthecaptionusedinthetaskpanedrop-downlistbox.

Page 2801: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2802: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecaptionattributeisarequiredattributeofthetaskpaneelement.

Ifthecaptionattibuteiscontainsanemptyvalue,thenthedefaultcaptionof"FormTasks"isused.

Page 2803: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecaptionattributeasitisusedinthetaskpaneelement:

<xsf:xDocumentClass>...<xsf:taskpanecaption="MyCustomTaskPane"href="MyCustomTaskPane.htm"/>...</xsf:xDocumentClass>

Page 2804: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

captionAttribute(toolbarElement)

Usedasthetitleofthetoolbar,whenthetoolbarisnotdockedtotheuserinterface.

Page 2805: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdTitle

Page 2806: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecaptionattributeisarequiredattributeofthetoolbarelement.

NoteThecaptionattributeisalsousedforthenameofthetoolbarintheCustomizeCommandsdialogboxforacontrol.

Page 2807: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecaptionattributeasitisusedinthetoolbarelement:

<xsf:toolbarcaption="CDCollectionToolbar"name="CDCollectionToolbar"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="NewCD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="NewTrack"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="NewLabel"showIf="always"></xsf:button><xsf:menucaption="Remove"><xsf:buttonaction="xCollection::remove"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::remove"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::remove"xmlToEdit="Label_16"caption="Label"showIf="always"></xsf:button></xsf:menu></xsf:toolbar>

Page 2808: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

captionAttribute(viewElement)

Providesthedisplaycaptionfortheviewwithintheviewlist.

Page 2809: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdViewName

Page 2810: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecaptionattributeisanoptionalattributeoftheviewelement.

Ifnotspecified,thecaptionoftheviewdefaultstothevalueofthenameattribute.

Page 2811: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecaptionattributeasitisusedintheviewelement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

Page 2812: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

clsidAttribute

SpecifiestheCOMclassID(CLSID)ofanActiveXcontrol.

Page 2813: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2814: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionallowedControl SpecifiestheActiveXcontrolsthatareallowedtobe

instantiated.

Page 2815: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="clsid"type="xsd:string"use="required"></xsd:attribute>

Page 2816: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

WhentheviewcontainsanOBJECTtag,thecontrolwillbeinstantiatedonlyiftheCLSIDislistedasanallowedControlelementinthepermissionselement.IfanActiveXcontrolwiththisCLSIDisnotpresentonthesystemandcan'tbeinstalled,theformwillnotopen.

Page 2817: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheclsidattributeasitisusedintheallowedControlelement:

<xsf:permissions><xsf:allowedControlcabFile="{84F32C01-78D8-4B93-8ED4-106DA70224C2}.cab”clsid="{84F32C01-78D8-4B93-8ED4-106DA70224C2}"version="1,0,0,1"/><xsf:allowedControlclsid="{F08DF954-8592-11D1-B16A-00C0F0283630}"/></xsf:permissions>

Page 2818: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

collateattribute

Specifieswhetherthepaperiscollated.

Page 2819: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 2820: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingaview.

Page 2821: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="collate"type="xsf:xdYesNo"></xsd:attribute>

Page 2822: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2823: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecollateattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

Page 2824: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

columnNameAttribute

IdentifiesthecolumnnameintheSQLtable(underlyingtheformlistview).

Page 2825: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdTitle

Page 2826: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecolumnNameattributeisarequiredattributeofthefieldelement.

Page 2827: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecolumnNameattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

Page 2828: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2829: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

commandTextAttribute

AstringpropertythatcontainstheActiveXDataObjects(ADO)SQLcommandtexttobeusedforqueryingthedatafromthespecifieddatasource.

Page 2830: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2831: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecommandTextattributeisarequiredattributeoftheadoAdapterelement.

Page 2832: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecommandTextattributeasitisusedintheadoAdapterelement:

<xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

Page 2833: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

componentAttribute

Specifiesthenameoftheeditingcomponentthatwillbereferencedwithintheactionattributeofabuttonelement.

Page 2834: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:enumeration

Page 2835: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecomponentattributeisarequiredattributeoftheeditWithelement.

ValidcomponentnamesincludexCollection,xOptional,xReplace,xTextList,xField,xImage,xFileAttachment.

Page 2836: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecomponentattributeasitisusedintheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"autoComplete="yes"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

ThefollowingisanexampleofthecomponentattributeasitisusedintheeditWithelement,wherethevalueofthecomponentattributeis"xFileAttachment":

<xsf:xmlToEditname="some_name"item="/my:myFields/my:field1">

Page 2837: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

<xsf:editWithallowedFileTypes="doc,xls"component="xFileAttachment"/></xsf:xmlToEdit><menuAreaname="msoStructuralEditingContextMenu"><buttonaction="xFileAttachment::attach"xmlToEdit="some_name"caption="Attach..."showIf="immediate"/><buttonaction="xFileAttachment::open"xmlToEdit="some_name"caption="Open"showIf="immediate"/><buttonaction="xFileAttachment::saveAs"xmlToEdit="some_name"caption="SaveAs..."showIf="immediate"/><buttonaction="xFileAttachment::remove"xmlToEdit="some_name"caption="Deletefile"showIf="immediate"/></menuArea>

Page 2838: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2839: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

conditionAttribute

DefinesanXPathexpressionevaluatedasaBooleanvaluetodeterminewhethertheassociatedactionwillbeinvoked.

Page 2840: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2841: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccurredinthe

form.

Page 2842: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="condition"type="xsd:string"use="optional"></xsd:attribute>

Page 2843: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2844: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheconditionattributeasitisusedintheruleelement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

Page 2845: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2846: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

connectionStringAttribute

AstringpropertythatcontainstheActiveXDataObjects(ADO)connectionstringtobeusedtoconnecttothedatasource.

Page 2847: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2848: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheconnectionStringattributeisarequiredattributeoftheadoAdapterelement.

Page 2849: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheconnectionStringattributeasitisusedintheadoAdapterelement:

<xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

Page 2850: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2851: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

containerAttribute

SpecifiesanXPathexpressionthatdeterminesthecontextinwhichthecontrolwillbeselectableanditsactionsenabled.

Page 2852: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2853: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThecontainerattributeisanoptionalattributeofthexmlToEditelement.

Ifthecurrentcontext(viewselectionorinsertionpoint)iswithinsomeHTMLelementthatmapsbacktoanXMLDocumentObjectModel(DOM)nodethatsatisfiesthecontainerXPathexpression,thecontrolisenabled.Otherwise,allactionsaredisabled.

ItdoesnotsufficeforthecontainerXMLDOMnodetoexist.ActionswillbeenabledonlywhenthecurrentselectioniswithinanHTMLelementthatmapstothecontainerXMLDOMnode.

NoteInMicrosoftOfficeInfoPath2003designmode,generatedXPathexpressionsfortheitemandcontainerattributeswillalwaysbeintheformitem="/a/b/c",whichprovidesthefullpathfromtherootelementoftheform'sunderlyingXMLdocument.Butpatternssuchasitem="b/c",orwithpredicatesasinitem="b[@p='23']/c[q]"areallowediftheformdefinition(.xsf)fileiseditedmanually.

Page 2854: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthecontainerattributeasitisusedinthexmlToEditelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 2855: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

copiesattributeSpecifiesthenumberofcopiestobeprinted.

Page 2856: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:Integer

Page 2857: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Page 2858: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Usage

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

Page 2859: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="copies"><xsd:simpleType><xsd:restrictionbase="xsd:integer"><xsd:minInclusivevalue="1"/><xsd:maxInclusivevalue="9999"/></xsd:restriction></xsd:simpleType></xsd:attribute>

Page 2860: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2861: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

dataAttribute

ContainsanXPathmatchexpressionthatdefinesthenodesettowhichthesignaturewillbeapplied.

Page 2862: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2863: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsignedDataBlock Definesanodesetintheform'sunderlyingXML

documenttowhichadigitalsignaturecanbeapplied

Page 2864: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="data"type="xsd:string"use="required"></xsd:attribute>

Page 2865: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2866: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedataattributeasitisusedinthesignedDataBlockelement:

<xsf:documentSignatures><xsf:signedDataBlockname=”main”data="my:myfields/my:subtree1|my:myfields/my:subtree2"signatureLocation="my:mifields/sig:signatures/main"mode="countersign"><xsf:message>Bypressingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

Page 2867: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2868: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

dataFormSolutionAttribute

Identifiestheformasadatabaseform.

Page 2869: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 2870: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedataFormSolutionattributeisanoptionalattributeofthexDocumentClasselement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"no".FormsbasedonActiveXDataObjects(ADO)orWebservicesandthathaveaspecialqueryviewshouldhavethisattributesetto"yes"toworkproperlyinMicrosoftOfficeInfoPath2003.

Page 2871: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedataFormSolutionattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

Page 2872: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2873: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

dataObjectAttribute(domEventHandlerElement)

ContainsthenameofthedataObjectelementtobeusedintheeventhandler.

Page 2874: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2875: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptiondomEventHandlerDefinesaneventhandlerforoneormorespecific

XMLDocumentObjectModel(DOM)nodes.

Page 2876: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="dataObject"type="xsd:string"use="optional"></xsd:attribute>

Page 2877: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedataObjectattributeisanoptionalattributeofthedomEventHandlerelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2878: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedataObjectattributeasitisusedinthedomEventHandlerelement:

<xsf:domEventHandlers><xsf:domEventHandlermatch="TravelReport/Expenses"handlerObject="TravelExpenses"dataObject="dataObject1"/></xsf:domEventHandlers>

Page 2879: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

dataObjectAttribute(getUserNameFromDataElement)

Thenameofthesecondarydatasourcewheretheusernamenamecanbefound.

Page 2880: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2881: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptiongetUserNameFromData RetrievesausernamebyusinganXPath

queryofthedatainthemaindatasourceorinasecondarydatasource.

Page 2882: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="dataObject"type="xsd:string"use="optional"></xsd:attribute>

Page 2883: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksForthemaindatasource,thisattributeshouldnotbepresent.Anemptystringisinvalid.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2884: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedataObjectattributeasitisusedinthegetUserNameFromDataelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

Page 2885: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

dataObjectAttribute(partFragmentElement)

SpecifiesthenameofthedataobjecttousewhensubmittingapartFragmentelementtoaMicrosoftBiztalk2004HumanWorkflowServices(HWS)server.

Page 2886: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2887: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionpartFragmentDefinesonesubstitutiongroupforaspecificpartofthe

inputSimpleObjectAccessProtocol(SOAP)message.

Page 2888: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="dataObject"type="xsd:string"use="optional"></xsd:attribute>

Page 2889: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2890: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedataObjectattributeasitisusedinthepartFragmentelement:

<xsf:partFragmentmatch="ActionSection/Target"replaceWith="/my:myFields/my:Target"dataObject="hwsDataObject3"/>

Page 2891: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2892: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

defaultAttribute

Specifiesthenameidentifieroftheviewchosentobethedefaultview.

Page 2893: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2894: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedefaultattributeisanoptionalattributeoftheviewselement.

Ifnotspecified,thedefaultviewisthefirstviewelementfoundwithintheviewselement.ThisviewisloadedwhenanMicrosoftOfficeInfoPath2003isinitiallyopened.

NoteInthecaseofformsthatuseActiveXDataObjects(ADO)oraWebserviceastheirprimarydatasource,thedefaultviewissetbytheinitialViewattributeintheprocessinginstructionoftheform'sXMLtemplatefile.Thisattributecannotbechangedwhileindesignmode.

Page 2895: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedefaultattributeasitisusedintheviewselement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

Page 2896: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

defaultAttribute(rolesElement)

Designatesaparticularroleasthedefaultrole.

Page 2897: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2898: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionroles Definesroles.

Page 2899: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="default"type="xsd:string"use="required"></xsd:attribute>

Page 2900: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfauserofaformisnotdefinedinthemembershipelementoftheroleselementoriftheroleofausercannotbedetermined,thatuserisimplicitlyassignedtotherolespecifiedbythedefaultattribute.Thedefaultattributeisrequiredfortheroleselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2901: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedefaultattributeasitisusedintheroleselement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

Page 2902: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

descriptionAttribute

Abriefdescriptionoftheform.

Page 2903: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2904: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedescriptionattributeisanoptionalattributeofthexDocumentClasselement.

Thevalueofthedescriptionattributecancontainupto255characters.

Page 2905: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedescriptionattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

Page 2906: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2907: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

designModeAttribute(viewElement)

Determineswhethertheview(*.xsl)filespecifiedinaviewelementcanbeopenedindesignmodeinMicrosoftOfficeInfoPath2003.

Page 2908: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdDesignMode

Page 2909: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionview ContainsinformationaboutaMicrosoftOfficeInfoPath2003

view.

Page 2910: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="designMode"type="xsf:xdDesignMode"></xsd:attribute>

Page 2911: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksYoucancreateacustomviewforaformtemplatebycreatinganXSLTransformation(XSLT)(*.xsl)filethatcontainsconstructsthatarenotsupportedindesignmodeinInfoPath.Toensurethataviewcan'tbeopenedindesignmode(andtopreventdataloss),setthedesignModeattributeintheformdefinitionfile(.xsf)to"protected".Protectedviewsareshowninallviewslistsanduserscanbefillthemoutlikeallforms,buttheycannotbeopenedindesignmode.IfthedesignModeattributeisspecifiedas"normal"orisnotspecified,theviewcanbeopenedindesignmode.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2912: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedesignModeattributeasitisusedintheviewelement:

<xsf:viewname="View"caption="View"designMode="protected"><xsf:mainpanetransform="view1.xsl"/>...</xsf:view>

Page 2913: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2914: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

detailKeyAttribute

ContainstheXPathofthefieldinthedetailXMLfragmentthatformstherelationshiptothemasterXMLfragment.

Page 2915: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2916: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionmasterDetailDefinestheXMLfragmentsthatformamasteranddetail

relationshipinaview'srepeatingtablesorrepeatingsections.

Page 2917: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="detailKey"type="xsd:string"></xsd:attribute>

Page 2918: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsearelativeXPathforthedetailKeyattribute.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2919: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedetailKeyattributeasitisusedinthemasterDetailelement:

<xsf:editWithcaption="group2"xd:autogeneration="template"component="xCollection"><xsf:masterDetailmasterViewContext="CTRL1_5"master="my:group2"masterKey="my:field1"detailKey="my:field3"></xsf:masterDetail></xsf:editWith>

Page 2920: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

disableMenuItemAttribute

Specifieswhetherthemenuitemforthesubmitoperationshouldbedisabled.

Page 2921: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 2922: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedisableMenuItemattributeisanoptionalattributeofthesubmitelement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"no".

Page 2923: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthedisableMenuItemattributeasitisusedinthesubmitelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

Page 2924: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

enabledAttribute

Specifieswhetherformmergingisenabledfortheform.

Page 2925: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 2926: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheenabledattributeisarequiredattributeoftheimportParameterselement.

Valuesinclude"yes"or"no".Thedefaultvalueis"yes".

Page 2927: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheenabledattributeasitisusedintheimportParameterselement:

<xsf:importParametersenabled="yes"<xsf:importSourcename=""schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

Page 2928: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2929: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

enforceScriptTimeoutAttribute

Specifieswhethertoenableordisableatime-outperiodforscriptsinaform.

Page 2930: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 2931: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionscripts Definesthesourceofallbusinesslogicscriptsusedatthe

documentlevelintheform.

Page 2932: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="enforceScriptTimeout"type="xsf:xdYesNo"use="optional"default="yes"></xsd:attribute>

Page 2933: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksSettingtheenforceScriptTimeoutattributeto"no"intheformdefinitionfile(.xsf)disablesthetime-outperiodforscriptsrunningintheform.Thedefaultvalueis"yes".

Forcoderunninginataskpane,thereisaseparatetime-outperiodprovidedbyMicrosoftInternetExplorer.Thistime-outperiodisnotaffectedbythevalueoftheenforceScriptTimeoutattribute.

Atime-outperiodcannotbespecifiedformanagedcodeinInfoPathforms.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2934: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheenforceScriptTimeoutattributeasitisusedinthescriptselement:

<xsf:scriptslanguage="jscript"enforceScriptTimeout="no"><xsf:scriptsrc="internal.js"/><xsf:scriptsrc="script.js"/></xsf:scripts>

Page 2935: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2936: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

expressionAttribute

AnXPathexpression(relativetotheexpressionContextattribute,ifspecified)thatmustbeevaluatedtovalidatetheXMLDocumentObjectModel(DOM)nodespecifiedinthematchattribute.

Page 2937: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2938: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheexpressionattributeisarequiredattributeoftheerrorConditionelement.

IfthespecifiedexpressionevaluatestoTrue,itisconsideredtobeanerrorconditionandthespecifiederrormessageisdisplayed.

Page 2939: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheexpressionattributeasitisusedintheerrorConditionelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

Page 2940: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2941: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

expressionAttribute(assignmentActionElement)

ContainsanXPathexpressiontopopulatethevalueofthetargetFieldattribute.

Page 2942: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2943: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionassignmentAction Definesanactiontosetthevalueofafield.

Page 2944: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="expression"type="xsd:string"use="required"></xsd:attribute>

Page 2945: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2946: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheexpressionattributeasitisusedintheassignmentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 2947: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2948: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

expressionAttribute(calculatedFieldElement)

Containstheformula,intheformofanXPathexpression,tobeevaluated.Theresultisstoredinthetargetlocation.

Page 2949: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2950: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptioncalculatedField Definesanindividualcalculation,includingtheformula,

whenthecalculationistobeperformed,andwheretheresultwillbestored.

Page 2951: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="expression"type="xsd:string"use="required"></xsd:attribute>

Page 2952: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2953: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheexpressionattributeasitisusedinthecalculatedFieldelement:

<xsf:calculations><xsf:calculatedFieldtarget="/my:myFields/my:average"expression="xdMath:Avg(../my:expenses/my:expense/my:amount)"refresh="onChange"/></xsf:calculations>

Page 2954: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2955: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

expressionContextAttribute

SpecifiestheXMLDocumentObjectModel(DOM)nodeonwhichtheexpressionspecifiedintheexpressionattributeisrooted.

Page 2956: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2957: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheexpressionContextattributeisanoptionalattributeoftheerrorConditionelement.

ItcontainsarelativeXPathexpressionthatidentifiestheXMLDOMnode(withinthecontextofthematchedXMLDOMnode)onwhichtheexpressionisrootedandthereforeshouldbeevaluated.Thedefaultvalueis"."ThisisthesameasthematchedXMLDOMnode.

Page 2958: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheexpressionContextattributeasitisusedintheerrorConditionelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

Page 2959: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

featureAttribute

SetswhethertheAutoRecoverfeatureisenabled.

Page 2960: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdEnabledDisabled

Page 2961: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionautoRecovery SpecifieswhethertheformwillsaveAutoRecover

informationandwhethertheAutoRecoversettingcanbechangedbytheuser.

Page 2962: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="feature"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute>

Page 2963: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksSettingthisattributetoavalueotherthan"enabled"or"disabled"willresultinanerrormessagewhenyouattempttoopentheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2964: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefeatureattributeasitisusedintheautoRecoveryelement:

<xsf:autoRecovery feature="disabled"/>

Page 2965: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2966: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

fieldAttribute

SpecifiesarelativeXPathexpressionfromtheXMLDocumentObjectModel(DOM)nodespecifiedbytheitemattributeofthexmlToEditelement.

Page 2967: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2968: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefieldattributeisanoptionalattributeoftheeditWithelement.

ThefieldattributereferstotheXMLDOMnodeintheform'sunderlyingXMLdocument,whichistobedisplayedasaneditablefieldforanxTextlisteditingcomponent.Thedefaultvalueis'.',whichcorrespondstoeditingthetextcontentoftheXMLDOMnodespecifiedbytheitemattributeofthexmlToEditelement.

Page 2969: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefieldattributeasitisusedintheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithautoComplete="no"field="@artist"component="xTextList"></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 2970: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2971: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

fileUrlAttribute

ContainstheUniformResourceLocator(URL)ofthe.xmlfile.

Page 2972: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:anyURI

Page 2973: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefileUrlattributeisarequiredattributeofthexmlFileAdapterelement.

Page 2974: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefileUrlattributeasitisusedinthexmlFileAdapterelement:

<xsf:query><xsf:xmlFileAdapterfileUrl="currencies.xml"/></xsf:query>

Page 2975: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2976: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

filterAttribute

SpecifiestheXPathexpressionofthestructuredXMLsubtreewhensubmittingasubsetoftheXMLdata.

Page 2977: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2978: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionpartFragmentDefinesonesubstitutiongroupforaspecificpartofthe

inputSimpleObjectAccessProtocol(SOAP)message.

Page 2979: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="filter"type="xsd:string"use="optional"></xsd:attribute>

Page 2980: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsethefilterattributewhensubmittingtheselectedfieldorgroupasastructuredXMLsubtree,includingthetags.Canbeomittedwhensubmittingthecontentofthefieldorgroup.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2981: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefilterattributeasitisusedinthepartFragmentelement:

<xsf:partFragmentmatch="/dfs:myFields/dfs:dataFields/s0:IsPrime/s0:inValue"replaceWith=/dfs:myFields/dfs:dataFields/s0:IsPrime"filter="."sendAsString="yes"/>

Page 2982: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2983: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

filterDependencyAttribute

Specifiesautomaticreapplicationofafilterwhenfilterfieldschange.

Page 2984: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 2985: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptioneditWith Specifiesaninstanceofaneditingcomponent,andprovides

thecorrespondingparameterstodetermineitsexactbehavior.

Page 2986: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="filterDependency"type="xsd:string"use="optional"></xsd:attribute>

Page 2987: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefilterDependencyattributeintheformdefinitionfile(.xsf)isalwayspresentforfiltersthatarespecifiedonrepeatingtablesandrepeatingsectionscreatedinthedesigner.EventhoughthereisnowaytotogglefilterDependencyonandoffindesignmodeinInfoPath,youcanturnoffautomaticrefreshingoffiltersbyremovingthefilterDependencyattributefromtheeditWithelementintheformdefinitionfile.

WhenthefilterDependencyattributeispresent,thefilterisreappliedwhentheonAfterChangeeventofanodeisraised.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 2988: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefilterDependencyattributeasitisusedintheeditWithelement:

<editWithcomponent="xCollection"widgetIcon="filter|standard"useFilter="yes|no"filterDependency="xpath1|xpath2|xpath3>

Page 2989: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2990: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

followingSiblingsAttribute

SpecifiesarelativeXPathexpressionfromtheparentnodethatspecifiestheXMLDocumentObjectModel(DOM)nodespriortowhichtheinsertionoftheXMLfragmentshouldoccur.

Page 2991: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2992: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefollowingSiblingsattributeisanoptionalattributeofthechooseFragmentelement.

Theinsertionwillbeasachildoftheparentnode,butitwillbepriortoanynodesfoundthatsatisfytheXPathexpressionspecifiedbythefollowingSiblingsattribute.Ifnonodesarefound,theinsertionactsasanappend.

ThefollowingSiblingsattributeisonlyusedduringaninsertwhenthecurrentcontextisnotinanitem.Thebehavioristoappendtothecontentoftheparentnode,unlessthefollowingSiblingsattributeisspecified,inwhichcasetheinsertionisstillwithinthecontentoftheparent,butpriortoanyfollowingSiblingsnodes.

Page 2993: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefollowingSiblingsattributeasitisusedinthechooseFragmentelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"followingSiblings="."><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 2994: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 2995: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

footerAttribute

Specifiesthefootertextwhenprintingaview.

Page 2996: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 2997: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefooterattributeisanoptionalattributeoftheprintSettingselement.TheprintSettingselementalsoprovidesaheaderattribute.

Thefooterattributecannotbegreaterthan255charactersinlength.

Whenusingaheaderorfooterinaform,thereareanumberofvariablesthatcanbeusedtodisplayinformationsuchaspagenumbers,dates,andtimes;ortoalignthetextthattheheaderorfootercontains.

Headerandfootervariables

Page 2998: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefooterattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

Page 2999: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3000: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

fullyEditableNamespaceAttribute

IdentifiesthenamespaceofanXMLSchemaintheformtemplatethatcanbeentirelymodifiedinMicrosoftOfficeInfoPath2003designmode.

Page 3001: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:anyURI

Page 3002: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThefullyEditableNamespaceattributeisanoptionalattributeofthesolutionPropertieselement.

Page 3003: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthefullyEditableNamespaceattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

Page 3004: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3005: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

handlerObjectAttribute

Identifiestheuniquenameoftheeventhandlerinthescriptingcode.

Page 3006: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3007: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThehandlerObjectattributeisarequiredattributeofthedomEventHandlerelement.

ThereferencedscriptmustusethisnametodefineeventhandlersforthespecifiedXMLDocumentObjectModel(DOM)node.Forexample,scriptmaycontainfunctionssuchasTravelExpenses::OnValidateandTravelExpenses::OnAfterChangethatarecalledwheneverthespecifiedeventsoccuratthematchingXMLDOMnode.

Page 3008: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthehandlerObjectasitisusedinthedomEventHandlerelement:

<xsf:domEventHandlers><xsf:domEventHandlermatch="TravelReport/Expenses"handlerObject="TravelExpenses"/></xsf:domEventHandlers>

Page 3009: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3010: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

headerAttribute

Specifiestheheadertextwhenprintingaview.

Page 3011: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3012: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheheaderattributeisanoptionalattributeoftheprintSettingselement.TheprintSettingselementalsoprovidesafooterattribute.

Theheaderattributecannotbegreaterthan255charactersinlength.

Whenusingaheaderorfooterinaform,thereareanumberofvariablesthatcanbeusedtodisplayinformationsuchaspagenumbers,dates,andtimes;ortoalignthetextthattheheaderorfootercontains.

Headerandfootervariables

Page 3013: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheheaderattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

Page 3014: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3015: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

hideStatusBarDisplayattribute

Specifieswhetherthecurrentroleisdisplayedinthestatusbar.

Page 3016: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3017: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionroles Definesroles.

Page 3018: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="hideStatusBarDisplay"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3019: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameoftheroleforthecurrentuserisdisplayedinthestatusbar.Iftheroleofauserischangedprogrammatically,thestatusbarisupdated.

ThevalueofthehideStatusBarDisplayattributeis"no"bydefault.Iftheattributeisnotincludedintheroleselement,therefore,theroleofthecurrentuserisdisplayedinthestatusbar.ThehideStatusBarDisplayattributemustbeincludedintheroleselementanditsvaluemustbesetto"yes"topreventtheroleforthecurrentuserfrombeingdisplayedinthestatusbar.

ThereisnomechanismintheuserinterfaceofInfoPathforchangingthehideStatusBarDisplayattribute.Toaddthisattributetotheroleselementortochangeitsvalue,theformdefinitionfile(.xsf)ofaformmustbeeditedmanually.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3020: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthehideStatusBarDisplayattributeasitisusedintheroleselement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

Page 3021: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3022: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

hrefAttribute(initialXmlDocumentElement)

SpecifiesthenameoftheXMLtemplatefiletobeusedwhenauserclicksFillOutaFormontheFilemenu.

Page 3023: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdFileName

Page 3024: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThehrefattributeisarequiredattributeoftheinitialXmlDocumentelement.

Page 3025: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthehrefattributeasitisusedintheinitialXmlDocumentelement:

<xsf:fileNew><xsf:initialXmlDocumentcaption="TravelReport"href="TravelReportTemplate.xml"/></xsf:fileNew>

Page 3026: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3027: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

hrefAttribute(taskpaneElement)

SpecifiestherelativeorabsoluteUniformResourceLocator(URL)toan.htmlfile.

Page 3028: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3029: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThehrefattributeisarequiredattributeofthetaskpaneelement.

The.htmlfileisloadedintoaninstanceofthetaskpanewhenaformisopened.The.htmlfilecanincludebusinesslogicscriptingcodeandcanaccessappropriateMicrosoftOfficeInfoPath2003objectmodelmembers.

Page 3030: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthehrefattributeasitisusedinthetaskpaneelement:

<xsf:xDocumentClass>...<xsf:taskpanecaption="MyCustomTaskPane"href="MyCustomTaskPane.htm"/>...</xsf:xDocumentClass>

Page 3031: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3032: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

hrefAttribute(useHttpHandlerElement)

SpecifiestheUniformResourceLocator(URL)towhichtheformshouldbesubmitted.

Page 3033: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:anyURI

Page 3034: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThehrefattributeisarequiredattributeoftheuseHttpHandlerelement.

Page 3035: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthehrefattributeasitisusedbytheuseHttpHandlerelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useHttpHandler>href="http://MyServer/InfoPathScripts/MyScript.asp"method="POST"</xsf:useHttpHandler><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

Page 3036: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3037: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

iconAttribute

ProvidesaUniformResourceLocator(URL)toabitmap(.bmp)orgraphicsinterchangeformat(.gif)file,whichisusedforthebuttonormenuitem.

Page 3038: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3039: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheiconattributeisanoptionalattributeofthebuttonelement.

Ifaniconisnotspecified,thecaptionalonewillbeused.Ifbothcaptionandiconarespecified,bothwillbedisplayed.Alternatively,thevaluecanalsobeanID,allowingaccesstointernalsystemicons.Ifthevalueisaninteger,itwillbeinterpretedasanID.

Page 3040: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheiconattributeasitisusedinthebuttonelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"icon="cd.bmp"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"icon="track.bmp"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"icon="label.bmp"></xsf:button></xsf:menu></xsf:menuArea>

Page 3041: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3042: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

infopathGroupAttribute

ContainsthenameofthegroupunderwhichallfieldsinaSharePointlistorlibrarywillbestored.

Page 3043: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3044: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationtoquery

aSharePointlistorlibrary.

Page 3045: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="infopathGroup"type="xsd:string"use="required"></xsd:attribute>

Page 3046: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3047: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheinfopathGroupattributeasitisusedinthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl=”http://xyzco/reports/”sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="XyzReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

Page 3048: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

infopathNameAttribute

Anattributeofthefieldelement.ContainsthecorrespondingInfoPathfieldnameforthesharepointNameattribute.

Page 3049: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3050: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionfield Containsfieldmappinginformationforeachfieldina

SharePointlistorlibraryandthecorrespondingnameusedinMicrosoftOfficeInfoPath.

Page 3051: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="infopathName"type="xsd:string"use="required"></xsd:attribute>

Page 3052: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheinfopathNameappearsasthefieldnamesinMicrosoftOfficeInfoPath2003SP1forthefieldsreturnedfromtheSharePointlistorlibrary.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3053: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheinfopathNameattributeasitisusedinthefieldelement:

<xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"isLookup="no"></xsf:field>

Page 3054: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

initiatorAttribute

Designatesaparticularroleastheinitiatorrole.

Page 3055: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3056: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionroles Definesroles.

Page 3057: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="initiator"type="xsd:string"use="optional"></xsd:attribute>

Page 3058: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfausercreatesanewInfoPathdocumentfromaformtemplate,thatuserisassignedtotherolethathasbeendesignatedastheinitiatorrole.Ifnoroleisdesignatedastheinitiatorroleintheformdefinitionfileofaform(thatis,iftheinitiatorattributeisnotincludedfortheroleselement),userswhocreateformsfromtheaccompanyingformtemplateretaintherolestowhichtheyareassignedinthemembershipelementoftheroleselement.Afteraformhasbeensaved,closed,andreopened,InfoPathnolongerchecksfortheinitiatorattribute.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3059: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheinitiatorattributeasitisusedintheroleselement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

Page 3060: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

initOnLoadAttribute

Specifieswhetherthedataobjectshouldbeinitializedondocumentload.

Page 3061: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 3062: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheinitOnLoadattributeisanoptionalattributeofthedataObjectelement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"no".

Page 3063: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheinitOnLoadattributeasitisusedinthedataObjectelement:

<xsf:dataObjects><xsf:dataObjectname="EmployeeNames"schema="EmployeeNames.xsd"initOnLoad="yes"><xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter> </xsf:query> </xsf:dataObject> </xsf:dataObjects>

Page 3064: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3065: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

innerFragmentAttribute

SpecifiesarelativeXPathexpressionfromtheparentnodetothesmallestfragmenttobeinserted.

Page 3066: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3067: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionchooseFragment SpecifiesanXMLfragment.

Page 3068: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="innerFragment"type="xsd:string"use="optional"></xsd:attribute>

Page 3069: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheinnerFragmentattributeisusedtoidentifythepositionofthecurrentdatacontextwithinthefragment,andtochoosetherightsubtreetoinsert.Thisreducestheneedtodefinemultiplefragmentsintheformdefinitionfile(.xsf)fordifferentdatacontexts.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3070: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheinnerFragmentattributeasitisusedinthechooseFragmentelement:

<xsf:xmlToEditname="expense_1"item="/my:myFields/my:expenses/my:expense"container="/my:myFields"><xsf:editWithcaption="expense"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentinnerFragment="my:expenses/my:expense"><my:expenses><my:expense/></my:expenses></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit>

Page 3071: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3072: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

isEnabledAttribute

Specifieswhethertheruleisenabledfortheform.

Page 3073: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3074: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccurredinthe

form.

Page 3075: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="isEnabled"type="xsf:xdYesNo"use="optional"default="yes"></xsd:attribute>

Page 3076: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedefaultvaluefortheisEnabledattributeis"yes".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3077: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheisEnabledattributeasitisusedintheruleelement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

Page 3078: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

isLookupAttribute

SpecifieswhetherafieldinaSharePointlistisalookupfield.

Page 3079: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3080: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionfield ContainsfieldmappinginformationforeachSharePointfield

andthecorrespondingnameusedinMicrosoftOfficeInfoPath2003SP1.

Page 3081: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="isLookup"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3082: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedefaultvaluefortheisLookupattributeis"no".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3083: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheisLookupattributeasitisusedinthefieldelement:

<xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"isLookup="no"></xsf:field>

Page 3084: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3085: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

itemAttribute

SpecifiesanXPathexpressionthatdeterminestheXMLDocumentObjectModel(DOM)nodestobeeditedusingtheeditingcomponentdefinedintheeditWithelement.

Page 3086: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3087: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheitemattributeisarequiredattributeofthexmlToEditelement.

Page 3088: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheitemattributeasitisusedinthexmlToEditelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 3089: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

languageAttribute

Definesthescriptlanguageusedinthebusinesslogicsourcefiles.

Page 3090: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdScriptLanguage

Page 3091: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThelanguageattributeisarequiredattributeofthescriptselement.

Allowedvaluesinclude"vbscript","jscript",and"javascript".Thedefaultvalueis"jscript".

Page 3092: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthelanguageattributeasitisusedinthescriptselement:

<xsf:scriptslanguage="jscript"enforceScriptTimeout="no"><xsf:scriptsrc="internal.js"/><xsf:scriptsrc="script.js"/></xsf:scripts>

Page 3093: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3094: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

lastOpenViewAttribute

IdentifiesthenameoftheviewthatwaslastopeninMicrosoftOfficeInfoPath2003designmode.

Page 3095: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3096: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThelastOpenViewattributeisanoptionalattributeofthesolutionPropertieselement.

ThenexttimetheformisopenedinInfoPathdesignmode,thisviewisautomaticallydisplayed.Thevalueforthisattributeshouldbeanexistingviewnameintheformtemplate.

Page 3097: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthelastOpenViewattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.0.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

Page 3098: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3099: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

lastVersionNeedingTransformAttribute

Identifies,temporarily,thevalueofthemaxToVersionUpgradeattributeinthedocumentVersionUpgradeelementforupgradewithan.xsltfileifscriptingcodeisbeingusedfortheupgrade.

Page 3100: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdSolutionVersion

Page 3101: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThelastVersionNeedingTransformattributeisanoptionalattributeofthesolutionPropertieselement.

Page 3102: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthelastVersionNeedingTransformattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.0.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

Page 3103: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

leftMarginAttribute

Specifiestheleftmarginwhenprintingaview.

Page 3104: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3105: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheleftMarginattributeisanoptionalattributeoftheprintSettingselement.

TheleftMarginattributemustbegreaterthanorequaltozero.

Page 3106: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheleftMarginattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

Page 3107: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3108: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

locationAttribute

ContainsthenamespaceUniformResourceIdentifier(URI)andlocation(aUniformResourceLocator(URL),relativetotheformdefinition(.xsf)file),anddelimitedbyaspace,ofthe.xsdfiledefiningtheXMLSchema.

Page 3109: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3110: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThelocationattributeisarequiredattributeofthedocumentSchemaelement.

Non-namespace-basedXMLSchemasarelistedwithjustthe.xsdfile,omittingthenamespacedeclarationandthewhitespacedelimiter.

Page 3111: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthelocationattributeasitisusedinthedocumentSchemaelement:

<xsf:documentSchemas><xsf:documentSchemalocation="urn:schema:custom:NamespacecustomFilename.xsd"rootSchema="yes"/></xsf:documentSchemas>

Page 3112: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

marginUnitsTypeAttribute

Specifiesthemarginunitsizewhenprintingaview.

Page 3113: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 3114: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThemarginUnitsTypeattributeisanoptionalattributeoftheprintSettingselement.

Valuesinclude"in"(inch)and"cm"(centimeter).

Page 3115: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemarginUnitsTypeattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

Page 3116: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3117: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

masterAttribute

ContainstheXPathoftheXMLfragmentthatisboundtoamastertableorsection.

Page 3118: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3119: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionmasterDetailDefinestheXMLfragmentsthatformamasteranddetail

relationshipinaview'srepeatingtablesorrepeatingsections.

Page 3120: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="master"type="xsd:string"></xsd:attribute>

Page 3121: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsearelativeXPathforthemasterattribute.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3122: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemasterattributeasitisusedinthemasterDetailelement:

<xsf:editWithcaption="group2"xd:autogeneration="template"component="xCollection"><xsf:masterDetailmasterViewContext="CTRL1_5"master="my:group2"masterKey="my:field1"detailKey="my:field3"></xsf:masterDetail></xsf:editWith>

Page 3123: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3124: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

masterKeyAttribute

ContainstheXPathofthefieldinthemasterXMLfragmentthatformstherelationshiptothedetailXMLfragment.

Page 3125: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3126: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionmasterDetailDefinestheXMLfragmentsthatformamasteranddetail

relationshipinaview'srepeatingtablesorrepeatingsections.

Page 3127: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="masterKey"type="xsd:string"></xsd:attribute>

Page 3128: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksUsearelativeXPathforthemasterKeyattribute.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3129: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemasterKeyattributeasitisusedinthemasterDetailelement:

<xsf:editWithcaption="group2"xd:autogeneration="template"component="xCollection"><xsf:masterDetailmasterViewContext="CTRL1_5"master="my:group2"masterKey="my:field1"detailKey="my:field3"></xsf:masterDetail></xsf:editWith>

Page 3130: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3131: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

masterViewContextAttribute

ContainsastringthatidentifiesanHTMLelementintheview.

Page 3132: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3133: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionmasterDetailDefinestheXMLfragmentsthatformamasteranddetail

relationshipinaview'srepeatingtablesorrepeatingsections.

Page 3134: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="masterViewContext"type="xsd:string"></xsd:attribute>

Page 3135: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevalueofthemasterViewContextattributespecifiesanelementthathasanxd:CtrLIdattributewithamatchingvalueintheHTMLthatrepresentsaviewoftheform.Forexample,amasterViewContextattributewithavalueof"myID"correspondstotheelementthathasavalueof"myID"foritsxd:CtrlIdattribute.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3136: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemasterViewContextattributeasitisusedinthemasterDetailelement:

<xsf:editWithcaption="group2"xd:autogeneration="template"component="xCollection"><xsf:masterDetailmasterViewContext="CTRL1_5"master="my:group2"masterKey="my:field1"detailKey="my:field3"></xsf:masterDetail></xsf:editWith>

Page 3137: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3138: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

matchAttribute(domEventHandlerElement)

IdentifiestheXMLDocumentObjectModel(DOM)nodeforwhichtheeventhandlerisdeclared.

Page 3139: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3140: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThematchattributeisarequiredattributeofthedomEventHandlerelement.

ThevaluemustbeavalidXPathexpressionthatidentifiestheXMLDOMnode.

NoteTheXPathexpressioncannotcontainpredicates.

Page 3141: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthematchattributeasitisusedinthedomEventHandlerelement:

<xsf:domEventHandlers><xsf:domEventHandlermatch="TravelReport/Expenses"handlerObject="TravelExpenses"/></xsf:domEventHandlers>

Page 3142: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3143: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

matchAttribute(errorConditionElement)

IdentifiestheXMLDocumentObjectModel(DOM)nodesonwhichthecustomvalidationisdeclared.

Page 3144: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3145: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThematchattributeisarequiredattributeoftheerrorConditionelement.

Page 3146: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthematchattributeasitisusedintheerrorConditionelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

Page 3147: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3148: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

matchAttribute(overrideElement)

IdentifiestheXMLDocumentObjectModel(DOM)nodeforwhichtheerrormessageoverrideisdefined.

Page 3149: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3150: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThematchattributeisarequiredattributeoftheoverrideelement.

ThevalueofthematchattributemustbeavalidXPathexpressionthatidentifiestheXMLDOMnode.

Page 3151: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthematchattributeasitisusedintheoverrideelement:

<xsf:schemaErrorMessages><xsf:overridematch="/sampleData/number"><xsf:errorMessageshortMessage="InvalidNumber.">Thevalueenteredmustbeavalidnumber.</xsf:errorMessage></xsf:override></xsf:schemaErrorMessages>

Page 3152: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3153: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

matchAttribute(partFragmentElement)

ContainsanXPathexpressionthatidentifiestheelementsandattributesinsidetheinputSimpleObjectAccessProtocol(SOAP)messagethataretobereplacedatruntime.

Page 3154: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3155: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThematchattributeisarequiredattributeofthepartFragmentelement.

Page 3156: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthematchattributeasitisusedinthepartFragmentelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"><xsf:partFragmentmatch="/dfs:myFields/dfs:dataFields/s0:IsPrime/s0:inValue"replaceWith="/dfs:myFields/dfs:dataFields/s0:IsPrime"/></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

Page 3157: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

maxLengthAttribute

Definesthelengthofthefieldinnumberofbytes.

Page 3158: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:byte

Page 3159: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThemaxLengthattributeisanoptionalattributeofthefieldelement.

Page 3160: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemaxLengthattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"maxLength="10"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

Page 3161: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

maxLengthAttribute(editWithElement)

Specifiesthemaximumnumberofcharactersallowedforplainsinglelinetextboxes.

Page 3162: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:simpleType

Page 3163: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptioneditWith Specifiesaninstanceofaneditingcomponent,andprovides

thecorrespondingparameterstodetermineitsexactbehavior.

Page 3164: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="maxLength"use="optional"><xsd:simpleType><xsd:restrictionbase="xsd:integer"><xsd:minInclusivevalue="-1"/><xsd:maxInclusivevalue="9999"/></xsd:restriction></xsd:simpleType></xsd:attribute>

Page 3165: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThemaxLengthattributeisonlyvalidforplain-texteditcontrolsthatdonotallowparagraphbreaks.SuchcontrolscorrespondtoeditWithelementswithacomponentattributesetto"xField"andatypeattributesetto"plain"(orwithoutatypeattributespecified).

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3166: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemaxLengthattributeasitisusedintheeditWithelement:

<editWithcomponent="xField"maxLength="100">

Page 3167: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

maxVersionToUpgradeAttribute

Inclusivevalueforthelatestformthatneedstobeupgraded.

Page 3168: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdSolutionVersion

Page 3169: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThemaxVersionToUpgradeattributeisanoptionalattributeoftheuseTransformelement.

Page 3170: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleshowsthemaxVersionToUpgradeattributeasitisusedintheuseTransformelement:

<xsf:documentVersionUpgrade><xsf:useTransformtransform="upgrade.xsl"minVersionToUpgrade="0.0.0.0"maxVersionToUpgrade="1.0.0.5"/></xsf:documentVersionUpgrade>

Page 3171: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3172: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

memberOfAttribute(getUserNameFromDataElement)

SpecifiestheroletobeassociatedwithauserwhoseusernameisreturnedbyanXPathqueryofadatasource.

Page 3173: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3174: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptiongetUserNameFromData RetrievesausernamebyusinganXPath

queryofthedatainthemaindatasourceorinasecondarydatasource.

Page 3175: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="memberOf"type="xsd:string"use="required"></xsd:attribute>

Page 3176: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3177: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthememberOfattributeasitisusedinthegetUserNameFromDataelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"<xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

Page 3178: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

memberOfAttribute(groupElement)

Specifiestheroletowhichagroupisassigned.

Page 3179: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3180: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptiongroup Associatesagroupwithaparticularrole.

Page 3181: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="memberOf"type="xsd:string"use="required"></xsd:attribute>

Page 3182: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3183: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthememberOfattributeasitisusedinthegroupelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

Page 3184: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

memberOfAttribute(userNameElement)

Specifiestheroletowhichauserisassigned.

Page 3185: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3186: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionuserName Associatesauserwithaparticularrole.

Page 3187: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="memberOf"type="xsd:string"use="required"></xsd:attribute>

Page 3188: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3189: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthememberOfattributeasitisusedintheuserNameelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

Page 3190: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

methodAttribute

SpecifiestheHTTPmethodtouseforthesubmitoperation.

Page 3191: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 3192: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThemethodattributeisarequiredattributeoftheuseHttpHandlerelement.

Theonlysupportedvalueis"POST".

Page 3193: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemethodattributeasitisusedbytheuseHttpHandlerelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useHttpHandler>href="http://MyServer/InfoPathScripts/MyScript.asp"method="POST"</xsf:useHttpHandler><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

Page 3194: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3195: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

minVersionToUpgradeAttribute

Inclusivevaluefortheoldestformthatcanbeupgraded.

Page 3196: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdSolutionVersion

Page 3197: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheminVersionToUpgradeattributeisarequiredattributeoftheuseTransformelement.

TheminVersionToUpgradeattributeisusedtopreventrunningtheXSLTransformation(XSLT)onformssodifferentfromthecurrentonethattheXSLTcausesriskofdataloss.

Page 3198: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleshowstheminVersionToUpgradeattributeasitisusedintheuseTransformelement:

<xsf:documentVersionUpgrade><xsf:useTransformtransform="upgrade.xsl"minVersionToUpgrade="0.0.0.0"maxVersionToUpgrade="1.0.0.5"/></xsf:documentVersionUpgrade>

Page 3199: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

modeAttribute

SpecifiesthesignaturerelationshipforthesignedDataBlockelement.

Page 3200: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdSignatureRelationEnum

Page 3201: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsignedDataBlock Definesanodesetintheform'sunderlyingXML

documenttowhichadigitalsignaturecanbeapplied

Page 3202: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="mode"type="xsf:xdSignatureRelationEnum"use="required"></xsd:attribute>

Page 3203: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedefaultmodeofasignedDataBlockelementissingle.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3204: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthemodeattributeasitisusedinthesignedDataBlockelement:

<xsf:documentSignatures><xsf:signedDataBlockname="main"data="my:myfields/my:subtree1|my:myfields/my:subtree2"signatureLocation="my:mifields/sig:signatures/main"mode="countersign"><xsf:message>Bypressingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

Page 3205: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(actionElement)

TheuniquenameoftheactionasspecifiedbytheMicrosoftBizTalk2003HumanWorkflowServices(HWS)workflowdesigner.

Page 3206: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdHWSname

Page 3207: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionaction Containstheinformationforanindividualaction.

Page 3208: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsf:xdHWSname"use="required"></xsd:attribute>

Page 3209: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisarequiredattributeoftheactionelement.

ThenameisusedfortheonClickeventofthecorrespondingbuttonintheWorkflowtaskpane.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3210: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedintheactionelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

Page 3211: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 3212: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3213: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameattribute(adoAdapterelement)

ContainsthenameoftheadoAdapterelement.

Page 3214: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdTitle

Page 3215: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionadoAdapter DefinesanActiveXDataObjects(ADO)dataadapterthat

retrievesdatafromanADOdatasourceforthespecifieddataobject.

Page 3216: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="optional"></xsd:attribute>

Page 3217: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisanoptionalattributeoftheadoAdapterelement.

Page 3218: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedintheadoAdapterelement:

<xsf:query><xsf:adoAdaptername="EmpInformation"connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

Page 3219: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3220: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(buttonElement)

UsedtoassociatetheOnClickeventhandlerofthebuttonwithascriptingfunction.

Page 3221: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 3222: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisanoptionalattributeofthebuttonelement,butisrequiredforbuttonsthatusescriptingcodefortheiractions.

Page 3223: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthebuttonelement:

<xsf:menuAreaname="msoViewMenu"><xsf:buttoncaption="CDCollection"name="SwitchToView0"></xsf:button><xsf:buttoncaption="AllTracks"name="SwitchToView1"></xsf:button></xsf:menuArea>

Intheform'sinternalscriptingfile,thefollowingeventhandlersareusedforthebuttonactions:

functionSwitchToView0::OnClick(){XDocument.View.SwitchView("CDCollection");}

functionSwitchToView1::OnClick(){XDocument.View.SwitchView("AllTracks");}

Page 3224: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3225: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(customCategoryElement)

Specifiesthenameofthecustomcategory.

Page 3226: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdTitle

Page 3227: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptioncustomCategory Specifiesthecategorythattheformtemplateappears

underintheFillOutaFormtaskpane.

Page 3228: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute>

Page 3229: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisarequiredattributeofthecustomCategoryelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3230: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthecustomCategoryelement:

<xsf:customCategoryname="Reports"/>

Page 3231: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(dataObjectElement)

Theuniquenameforthedataobject.

Page 3232: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdTitle

Page 3233: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisarequiredattributeofthedataObjectelement.

Page 3234: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthedataObjectelement:

<xsf:dataObjects><xsf:dataObjectname="EmployeeNames"schema="EmployeeNames.xsd"initOnLoad="yes"><xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter> </xsf:query> </xsf:dataObject> </xsf:dataObjects>

Page 3235: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3236: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(davAdapterElement)

ThenameofadavAdapter,usedtoinvoketheadapterfromformcode.

Page 3237: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdTitle

Page 3238: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptiondavAdapterContainsinformationtoenableInfoPathfilestobe

submittedtoaserverthatisrunningMicrosoftWindowsSharePointServicesoraWeb-basedDistributedAuthoringandVersioning(WebDAV)server.

Page 3239: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute>

Page 3240: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3241: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthedavAdapterelement:

<xsf:davAdaptername="SubmitToSharePoint"overwriteAllowed="yes"submitAllowed="yes"><xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/><xsf:folderURLvalue="http://some_server/some_doc_lib"/></xsf:davAdapter>

Page 3242: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(emailAdapterElement)

ContainsthenameoftheemailAdapterelement.

Page 3243: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdTitle

Page 3244: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionemailAdapter ContainstheinformationtosubmitanInfoPathfileasan

attachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

Page 3245: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute>

Page 3246: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3247: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedintheemailAdapterelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="[email protected]"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="my:bccNames"valueType="expression"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

Page 3248: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(extensionElement)

Auniquenameidentifyingtheextensionbeingspecified.

Page 3249: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 3250: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisarequiredattributeoftheextensionelement.

NoteUseoftheextensionelementisreserved.MicrosoftOfficeInfoPath2003ignoresanycontentwithintheextensionelement.

Page 3251: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedintheextensionelement:

<xsf:extensions><xsf:extensionname="someValue"anyAttributesHere="someValue">...opencontentmodelhere...</xsf:extension><xsf:extensions>

Page 3252: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3253: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(externalViewElement)

ContainsthenameofanexternalViewelement.

Page 3254: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdViewName

Page 3255: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionexternalViewDefinesaviewthatcannotbeeditedinInfoPath.

Page 3256: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsf:xdViewName"use="required"></xsd:attribute>

Page 3257: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3258: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedintheexternalViewelement:

<xsf:externalViews><xsf:externalViewname="SalesDoc"><xsf:mainpanetransform="myWordView.xsl"/></xsf:externalView><xsf:externalViews>

Page 3259: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(fieldElement)

Identifiesthefriendlynameofthefieldtobeusedontheformlistview.

Page 3260: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdTitle

Page 3261: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisarequiredattributeofthefieldelement.

Page 3262: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

Page 3263: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3264: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(fileElement)

Specifiesthenameofthefile.

Page 3265: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdFileName

Page 3266: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisarequiredattributeofthefileelement.

ThismustbearelativeURLfromtheURLoftheformdefinition(.xsf)file.Allfilesspecifiedhereareinsidetheformtemplate,soabsoluteURLsarenotsupported.

Page 3267: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthefileelement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

Page 3268: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(groupElement)

Specifiesthenameofagroupofuserstobeassignedtoaparticularrole.

Page 3269: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3270: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptiongroup Associatesagroupwithaparticularrole.

Page 3271: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsd:string"use="required"></xsd:attribute>

Page 3272: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3273: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthegroupelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

Page 3274: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(hwsAdapterElement)

Containsthenameofthedataadapter.

Page 3275: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdTitle

Page 3276: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionhwsAdapter DefinestheMicrosoftBiztalk2004HWS(HumanWorkflow

Services)dataadaptertostartorextendanactivityflow,andrespondtoatask.

Page 3277: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute>

Page 3278: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3279: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthehwsAdapterelement:

<hwsAdapter name="xsf:xdTitle" wsdlUrl="xsd:string" queryAllowed="xsf:xdYesNo" submitAllowed="xsf:xdYesNo"><hwsOperationtype="xsd:string"typeID="xsd:string"serviceUrl="xsd:string"/></hwsAdapter>

Page 3280: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3281: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(importSourceElement)

Identifiesthenameofthesourceformasdefinedintheprocessinginstructionofthatform’sunderlyingXMLdocument.

Page 3282: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3283: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisarequiredattributeoftheimportSourceelement.

Page 3284: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitusedintheimportSourceelement:

<xsf:importParametersenabled="yes"<xsf:importSourcename="MyForm"schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

Page 3285: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(menuAreaElement)

Correspondstooneofthebuilt-inMicrosoftOfficeInfoPath2003top-levelmenus.

Page 3286: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 3287: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisarequiredattributeofthemenuAreaelement.

Therecannotbemorethanonemenuareawiththesamenamewithinagivenview.

InfoPathhasthefollowingnamedmenuareasthatcorrespondtothebuilt-inmenuelementsthatcanbecustomizedusingthemenuAreaelement:

Name DescriptionmsoFileMenu MenuitemsthatareaddedtotheFile

menu.msoEditMenu Menuitemsthatareaddedtothe

Editmenu.msoInsertMenu Menuitemsthatareaddedtothe

Insertmenu.msoViewMenu Menuitemsthatareaddedtothe

Viewmenu.msoFormatMenu Menuitemsthatareaddedtothe

Formatmenu.msoToolsMenu Menuitemsthatareaddedtothe

Toolsmenu.msoTableMenu Menuitemsthatareaddedtothe

Tablemenu.msoHelpMenu Menuitemsthatareaddedtothe

Helpmenu.msoStructuralEditingContextMenu Menuitemsthatareaddedtothe

right-clickshortcutmenu.

Page 3288: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthemenuAreaelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

Page 3289: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(operationElement)

ContainstheuniquenameoftheWebservicemethod.

Page 3290: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3291: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisarequiredattributeoftheoperationelement.

Page 3292: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedintheoperationelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

Page 3293: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(propertyElement)

Definesthenameoftheproperty.

Page 3294: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3295: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisarequiredattributeofthepropertyelement.AfileTypevalueof"ActiveX-CAB"identifiesthatthefileisa.cabfileaddedbythedesignerandindicatesthatthefileshouldbemanagedbytheActiveXsupportfeaturesofthedesigner.Thetimestamppropertyidentifiesthelatestversionofthe.cabfile.TheversioninformationisusedforautomaticallyupdatingthefilewhenthedeveloperhasamorerecentversionintheActiveXICT/CABdirectory.

Page 3296: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingareexamplesofthenameattributeasitisusedinthepropertyelement:

<xsf:files><xsf:filename="example.cab"><xsf:fileProperties><xsf:propertyname="fileType"type="string"value="ActiveX-CAB"/><xsf:propertyname="timestamp"type="string"value="xyz"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

Page 3297: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(roleElement)

Specifiesastringthatcanbeusedtoidentifyaparticularrole.

Page 3298: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdRoleName

Page 3299: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionrole Definesrole.

Page 3300: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsf:xdRoleName"use="required"></xsd:attribute>

Page 3301: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3302: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedintheroleelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

Page 3303: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(ruleSetElement)

ContainsthenameoftheruleSetelement.

Page 3304: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3305: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionruleSet Containsoneormoreruleelements.

Page 3306: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsd:string"use="required"></xsd:attribute>

Page 3307: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3308: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedintheruleSetelement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

Page 3309: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3310: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(sharepointListAdapterElement)

ContainsthenameofthesharepointListAdapterelement;alsousedasthesecondarydatasourcename.

Page 3311: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdTitle

Page 3312: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationtoquery

aSharePointlistorlibrary.

Page 3313: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute>

Page 3314: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3315: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl="http://www.contoso.com/reports/"sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="ContosoReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

Page 3316: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(signedDataBlockElement)

ContainsthenameofthesignedDataBlockelement.

Page 3317: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdSignedDataBlockName

Page 3318: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsignedDataBlock Definesanodesetintheform'sunderlyingXML

documenttowhichadigitalsignaturecanbeapplied.

Page 3319: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsf:xdSignedDataBlockName"use="required"></xsd:attribute>

Page 3320: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3321: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthesignedDataBlockelement:

<xsf:documentSignatures><xsf:signedDataBlockname="main"data="my:myfields/my:subtree1|my:myfields/my:subtree2"signatureLocation="my:mifields/sig:signatures/main"mode="countersign"><xsf:message>Byclickingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

Page 3322: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3323: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(taskElement)

TheuniquenameofthetaskasspecifiedbytheMicrosoftBiztalkServer2004HWS(HumanWorkflowServices)workflowdesigner.

Page 3324: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdHWSname

Page 3325: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptiontask TheHWStaskinformationenabledfortheform

Page 3326: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsf:xdHWSname"use="required"></xsd:attribute>

Page 3327: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisusedfortheonClickeventofthebuttonintheWorkflowtaskpane.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3328: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthetaskelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

Page 3329: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 3330: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(toolbarElement)

Identifiesthecorrespondingtoolbarwithindifferentviews.

Page 3331: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdTitle

Page 3332: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisarequiredattributeofthetoolbarelement.

Mustbeuniquewithinagivensolution.

Page 3333: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthetoolbarelement:

<xsf:toolbarcaption="CDCollectionToolbar"name="CDCollectionToolbar"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="NewCD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="NewTrack"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="NewLabel"showIf="always"></xsf:button><xsf:menucaption="Remove"><xsf:buttonaction="xCollection::remove"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::remove"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::remove"xmlToEdit="Label_16"caption="Label"showIf="always"></xsf:button></xsf:menu></xsf:toolbar>

Page 3334: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(userNameElement)

Specifiesthenameofausertobeassignedtoaparticularrole.

Page 3335: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3336: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionuserName Associatesauserwithaparticularrole.

Page 3337: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsd:string"use="required"></xsd:attribute>

Page 3338: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3339: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedintheuserNameelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

Page 3340: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(viewElement)

Identifiestheviewforobjectmodelcallswhenswitchingviews,andforspecifyingthedefaultview.

Page 3341: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdViewName

Page 3342: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisarequiredattributeoftheviewelement.

Page 3343: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedintheviewelement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

Page 3344: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3345: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(webServiceAdapterElement)

ContainsthenameofthewebServiceAdapterelement.

Page 3346: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdTitle

Page 3347: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionwebServiceAdapter DefinesaWebservicedataadapterthatretrieves

datafromaWebserviceforthespecifieddataobject.

Page 3348: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="optional"></xsd:attribute>

Page 3349: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisanoptionalattributeofthewebServiceAdapterelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3350: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthewebServiceAdapterelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"useDataSet="no"><xsf:operationname="getOrders"soapAction="http://www.contoso.com/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

Page 3351: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3352: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(xDocumentClassElement)

Providesaunique,UniformResourceName(URN)–basednamefortheformthattheformdefinition(.xsf)filedefines.

Page 3353: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3354: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisanoptionalattributeofthexDocumentClasselement.

Ifthisattributeismissing,theformisnamedfromtheUniformResourceLocator(URL)orformdefinitionfilename,whichcanbeobtainedfromtheprocessinginstructionsoftheform'sunderlyingXMLdocument.

Page 3355: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

Page 3356: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(xmlFileAdapterElement)

ContainsthenameofthexmlFileAdapterelement.

Page 3357: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdTitle

Page 3358: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionxmlFileAdapter Definesan.xmlfiledataadapterthatretrievesdata

froman.xmlfileforthespecifieddataobject.

Page 3359: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="optional"></xsd:attribute>

Page 3360: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisanoptionalattributeofthexmlFileAdapterelement.

Page 3361: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthexmlFileAdapterelement:

<xsf:query><xsf:xmlFileAdaptername="CurrencyInfo"fileUrl="currencies.xml"/></xsf:query>

Page 3362: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nameAttribute(xmlToEditElement)

UsedinthexmlToEditattributeofthebuttonelementtoassociateactionsoftheassociatededitingcomponenttobuttonsdefinedinmenusandtoolbars.

Page 3363: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 3364: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenameattributeisarequiredattributeofthexmlToEditelement.

ThereshouldbenomorethanonexmlToEditelementwiththesamenameinagivenview.

Page 3365: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenameattributeasitisusedinthexmlToEditelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 3366: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3367: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

nodeAttribute

DefinestheXPathexpressionneededtoextractthevalueofthespecifiedpropertyfromtheform'sunderlyingXMLdocument.

Page 3368: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3369: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThenodeattributeisarequiredattributeofthefieldelement.

Page 3370: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthenodeattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

Page 3371: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

onAfterSubmitAttribute

Specifieswhethertheformshouldbeclosed,keptopen,orifanewformshouldbecreatedafterasuccessfulsubmission.

Page 3372: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 3373: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheonAfterSubmitattributeisanoptionalattributeofthesubmitelement.

Valuesinclude"Close","KeepOpen",and"OpenNew".Thedefaultvalueis"KeepOpen".

Ifthesubmitoperationisnotsuccessful,thentheonAfterSubmitattributeisignoredandtheformiskeptopen.

Page 3374: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheonAfterSubmitattributeasitisusedinthesubmitelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

Page 3375: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

orientationAttribute

Specifiestheorientationwhenprintingaview.

Page 3376: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 3377: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheorientationattributeisanoptionalattributeoftheprintSettingselement.

Valuesinclude"portrait"and"landscape".

Page 3378: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheorientationattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

Page 3379: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3380: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

overwriteAllowedAttributeSpecifieswhethertheadaptercanoverwriteanexistingfile.

Page 3381: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3382: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptiondavAdapterContainsinformationtoenableInfoPathfilestobe

submittedtoaMicrosoftWindowsSharePointServicesserveroraWeb-basedDistributedAuthoringandVersioning(WebDAV)server.

Page 3383: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="overwriteAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3384: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3385: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheoverwriteAllowedattributeasitisusedinthedavAdapterelement:

<xsf:davAdaptername="SubmitToSharePoint"overwriteAllowed="yes"submitAllowed="yes"><xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/><xsf:folderURLvalue="http://some_server/some_doc_lib"/></xsf:davAdapter>

Page 3386: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

pageRangeEndAttribute

Specifiesthelastpagetobeprinted.

Page 3387: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:Integer

Page 3388: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Page 3389: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="pageRangeEnd"><xsd:simpleType><xsd:restrictionbase="xsd:integer"><xsd:minInclusivevalue="1"/><xsd:maxInclusivevalue="32000"/></xsd:restriction></xsd:simpleType></xsd:attribute>

Page 3390: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3391: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthepageRangeEndattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

Page 3392: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

pageRangeStartAttribute

Specifiesthefirstpagetobeprinted.

Page 3393: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:Integer

Page 3394: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Page 3395: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="pageRangeStart"><xsd:simpleType><xsd:restrictionbase="xsd:integer"><xsd:minInclusivevalue="1"/><xsd:maxInclusivevalue="32000"/></xsd:restriction></xsd:simpleType></xsd:attribute>

Page 3396: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3397: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthepageRangeStartattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

Page 3398: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

paperSizeattribute

Specifiesthesizeofthepaper.

Page 3399: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:String

Page 3400: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Page 3401: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="paperSize"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType></xsd:attribute>

Page 3402: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3403: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthepaperSizeattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

Page 3404: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

paperSourceAttribute

Specifiesthesourceofthepaper.

Page 3405: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:String

Page 3406: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Page 3407: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="paperSource"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType></xsd:attribute>

Page 3408: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3409: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthepaperSourceattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

Page 3410: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3411: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

parentAttribute

SpecifiesarelativeXPathexpressionfromthecontainernode.

Page 3412: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3413: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheparentattributeisanoptionalattributeofthechooseFragmentelement.

ReferstotheXMLDocumentObjectModel(DOM)nodeunderwhichthisfragmentshouldbeinserted.Thedefaultvalueis".",whichcorrespondstoinsertingdirectlyunderthecontainerparentnode.

Page 3414: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheparentattributeasitisusedinthechooseFragmentelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"followingSiblings="."><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 3415: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

printerNameAttribute

Specifiestheprintername.

Page 3416: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:String

Page 3417: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Page 3418: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="printerName"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType></xsd:attribute>

Page 3419: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3420: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheprinterNameattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

Page 3421: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

printerSpecificSettingsAttribute

Specifiessettingsforaparticularprinter.

Page 3422: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:String

Page 3423: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Page 3424: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="printerSpecificSettings"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType></xsd:attribute>

Page 3425: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3426: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheprinterSpecificSettingsattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"printerSpecificSettings="nameoffilethatcontainsprinter-specificsettings"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer>

Page 3427: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

</xsf:printSettings>

Page 3428: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

printViewAttribute

Specifiesthenameofanotherviewtouseforprintingthisview.

Page 3429: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3430: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheprintViewattributeisanoptionalattributeoftheviewelement.

Page 3431: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheprintViewattributeasitisusedintheviewelement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"printView="PrintView"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

Page 3432: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3433: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

productVersionAttribute

IdentifiestheversionnumberofMicrosoftOfficeInfoPath2003formtemplatewithwhichtheformwascreatedorforwhichaparticularformisintended.

Page 3434: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3435: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheproductVersionattributeisanoptionalattributeofthexDocumentClasselement.

Itsformatis####.####.####(major.minor.build).

Page 3436: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheproductVersionattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

Page 3437: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3438: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

promptToSaveChangesAttribute

Specifieswhethertheuserispromptedtosavechangestotheformbeforetheactioncompletes.

Page 3439: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3440: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptioncloseDocumentActionDefinesaformcloseaction.

Page 3441: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="promptToSaveChanges"type="xsf:xdYesNo"use="required"></xsd:attribute>

Page 3442: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedefaultvalueis"yes".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3443: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthepromptToSaveChangesattributeasitisusedinthecloseDocumentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 3444: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

proofingAttribute

Switchestheproofingfeatures,suchasthespellingchecker,onoroff.

Page 3445: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 3446: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheproofingattributeisanoptionalattributeoftheeditWithelement.

Valuesinclude"yes"and"no".Thedefaultvalueis"yes".

Page 3447: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheproofingattributeasitisusedintheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"proofing="yes"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 3448: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3449: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

publishSaveUrlAttribute

ContainsthelocationofthesavedformtemplateifdifferentfromthevalueofthepublishUrlattribute.

Page 3450: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3451: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsolutionProperties Containsdesign-timeinformationaboutanInfoPath

form.

Page 3452: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="publishSaveUrl"type="xsd:string"use="optional"></xsd:attribute>

Page 3453: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3454: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthepublishSaveUrlattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:names?pace1:mynames"/publishSaveUrl="C:\DocumentsandSettings\username\Desktop\Template1.xsn"></xsf:applicationParameters>

Page 3455: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3456: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

publishUrlAttribute

Identifieswheretheformwaspublishedandwheretheformtemplateshoulddownloadupdatesfrom.

Page 3457: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3458: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThepublishUrlattributeisanoptionalattributeofthexDocumentClasselement.

ThepublishUrlattributeissetautomaticallywhenaformispublishedordeployedthroughtheInfoPathdesignmode.Whenaformisopened,itwillattempttoretrievethelatestupdatesfromthepublishedlocation.

Page 3459: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthepublishUrlattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="0.9.0.0"publishUrl="http://MyServer/InfoPathTemplates/MyTemplate.xsn">...</xsf:xDocumentClass>

Page 3460: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

queryAllowedAttribute(adoAdapterElement)

Specifieswhetherdatacanberetrievedfromthedatasourcethroughthequerymethodofthedataadapterobject.

Page 3461: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 3462: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThequeryAllowedattributeisanoptionalattributeoftheadoAdapterelement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"yes".

Page 3463: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthequeryAllowedattributeasitisusedintheadoAdapterelement:

<xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

Page 3464: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3465: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

queryAllowedAttribute(davAdapterElement)

Specifieswhethertheadaptercanbeusedforqueryingthedatasource.

Page 3466: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3467: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptiondavAdapterContainsinformationtoenableInfoPathfilestobe

submittedtoaserverthatisrunningMicrosoftWindowsSharepointServicesoraWeb-basedDistributedAuthoringandVersioning(WebDAV)server.

Page 3468: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3469: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThequeryAllowedattributeisgenerallyomittedforthedavAdapterelement,correspondingtoadefaultvalueof"no".Avalueof"yes"forthisattributecausesanerror.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3470: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthequeryAllowedattributeasitisusedinthedavAdapterelement:

<xsf:davAdaptername="SubmitToSharePoint"overwriteAllowed="yes"submitAllowed="yes"queryAllowed="no"><xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/><xsf:folderURLvalue="http://contoso/some_doc_lib"/></xsf:davAdapter>

Page 3471: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

queryAllowedAttribute(emailAdapterElement)

Specifieswhethertheadaptercanbeusedforqueryingthedatasource.

Page 3472: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3473: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionemailAdapter ContainstheinformationtosubmitanInfoPathfileasan

attachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

Page 3474: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3475: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThequeryAllowedattributeisgenerallyomittedfortheemailAdapterelement,correspondingtoadefaultvalueof"no".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3476: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthequeryAllowedattributeasitisusedintheemailAdapterelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"queryAllowed<xsf:tovalue="[email protected]"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="[email protected]"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

Page 3477: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

queryAllowedAttribute(hwsAdapterElement)

Specifieswhethertheadaptercanbeusedforqueryingthedatasource.

Page 3478: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3479: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionhwsAdapter DefinestheMicrosoftBiztalk2004HWS(HumanWorkflow

Services)dataadaptertostartorextendanactivityflow,andrespondtoatask.

Page 3480: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3481: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThequeryAllowedattributecanbeomittedfromthehwsAdapterelement,correspondingtoadefaultvalueof"no".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3482: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthequeryAllowedattributeasitisusedinthehwsAdapterelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

Page 3483: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 3484: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

queryAllowedAttribute(sharepointListAdapterElement)

Specifieswhethertheadaptercanbeusedforqueryingthedatasource.

Page 3485: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3486: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationtoquery

aSharePointlistorlibrary.

Page 3487: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3488: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThequeryAllowedvalueisalwayssetto"yes"forthesharepointListdapter.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3489: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthequeryAllowedattributeasitisusedinthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl="http://www.contoso.com/reports/"sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="ContosoReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

Page 3490: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

queryAllowedAttribute(webServiceAdapterElement)

Specifieswhetherdatacanberetrievedfromthedatasourcethroughthequerymethodofthedataadapterobject.

Page 3491: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 3492: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThequeryAllowedattributeisanoptionalattributeofthewebServiceAdapterelement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"yes".

Page 3493: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthequeryAllowedattributeasitisusedinthewebServiceAdapterelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

Page 3494: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3495: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

refreshAttribute

Specifieswhentheexpressionwillbeevaluated.

Page 3496: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3497: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptioncalculatedField Definesanindividualcalculation,includingtheformula,

whenthecalculationistobeperformed,andwheretheresultwillbestored.

Page 3498: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="refresh"type="xsd:string"use="required"></xsd:attribute>

Page 3499: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheexpressionspecifiedbytheexpressionattributeisevaluatedaccordingtotherefreshattributeofthecalculatedFieldelement.Avalueof"onInit"causestheexpressiontobeevaluatedwhenthenodeisinitialized.Avalueof"onChange"causestheexpressiontobeevaluatedwhenoneormoreparametersoftheexpressionchange.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3500: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftherefreshattributeasitisusedinthecalculatedFieldelement:

<xsf:calculations><xsf:calculatedFieldtarget="/my:myFields/my:average"expression="xdMath:Avg(../my:expenses/my:expense/my:amount)"refresh="onChange"/></xsf:calculations>

Page 3501: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

removeAncestorsAttribute

Specifiesthenumberofancestor(parent)elementstoberemovedwhenthelastitemisremoved.

Page 3502: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:nonNegativeInteger

Page 3503: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheremoveAncestorsattributeisanoptionalattributeoftheeditWithelement.

Default=0.Mustbeanon-negativeinteger.

Page 3504: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheremoveAncestorsattributeasitisusedintheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"removeAncestors="0"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 3505: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3506: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWithAttribute

ContainsanXPathexpressionthatidentifiesthevaluesinthesourcedocumentthatshouldbeusedtoreplacepartsoftheinputSimpleObjectAccessProtocol(SOAP)message.

Page 3507: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3508: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThereplaceWithattributeisarequiredattributeofthepartFragmentelement.

Page 3509: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthereplaceWithattributeasitisusedinthepartFragmentelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"><xsf:partFragmentmatch="/dfs:myFields/dfs:dataFields/s0:IsPrime/s0:inValue"replaceWith="/dfs:myFields/dfs:dataFields/s0:IsPrime"/></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

Page 3510: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

requiredAttribute

IdentifieswhetherthisfieldacceptsNullvalues.

Page 3511: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 3512: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTherequiredattributeisanoptionalattributeofthefieldelement.

Valuesinclude"yes"and"no".Thedefaultvalueis"no".

Page 3513: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftherequiredattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

Page 3514: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

requireFullTrustAttribute

Allowstheformtorunasafullytrustedformwhenaformtemplateisregisteredorsignedwithacertificate.

Page 3515: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 3516: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTherequireFullTrustattributeisanoptionalattributeofthexDocumentClasselement.

FormsthathavetherequireFullTrustattributesetto"yes"getfulltrustsecurityprivilegesinMicrosoftOfficeInfoPath2003.Allowedattributevaluesare"yes"and"no".Thedefaultvalueis"no".

NoteFullytrustedformsneedtoberegistered,otherwisetheycannotbeopenedinInfoPath.

Page 3517: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftherequireFullTrustattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0"requireFullTrust="yes">...</xsf:xDocumentClass>

Page 3518: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

rightMarginAttribute

Specifiestherightmarginwhenprintingaview.

Page 3519: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3520: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTherightMarginattributeisanoptionalattributeoftheprintSettingselement.

TherightMarginattributemustbegreaterthanorequaltozero.

Page 3521: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftherightMarginattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

Page 3522: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3523: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

rootSchemaAttribute

IdentifiesanXMLSchemaasthetop-levelschemaoftheformbeingfilledout.

Page 3524: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 3525: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTherootSchemaattributeisanoptionalattributeofthedocumentSchemaelement.

OnlyoneoftheXMLSchemasdefinedforaformcanbemarkedastherootschema.Allowedvaluesare"yes"and"no".Thedefaultvalueis"no".

Page 3526: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftherootSchemaattributeasitisusedinthedocumentSchemaelement:

<xsf:documentSchemas><xsf:documentSchemalocation="urn:schema:custom:NamespacecustomFilename.xsd"rootSchema="yes"/></xsf:documentSchemas>

Page 3527: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ruleSetAttribute

ContainsthenameoftheruleSetactionelementtobeinvoked.

Page 3528: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3529: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionruleSetActionDefinestheruleSetactionelementtobeinvoked.

Page 3530: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="ruleSet"type="xsd:string"use="required"></xsd:attribute>

Page 3531: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3532: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheruleSetattributeasitisusedintheruleSetActionelement:

<xsf:onLoad><xsf:ruleSetActionruleSet="RuleSet4"/></xsf:onLoad>

Page 3533: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3534: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

schemaAttribute(dataObjectElement)

ThenameofanXMLSchemafile.

Page 3535: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3536: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheschemaattributeisanoptionalattributeofthedataObjectelement.

MicrosoftOfficeInfoPath2003automaticallypackagestheXMLSchemaforeachsecondarydataobjectaspartoftheformtemplate.Anentryismadeintheformdefinition(.xsf)filefortheXMLSchemafileusingthefileselement,anditisthefilenamethatisreferencedfromtheschemaattributeofthedataObjectelement.

Page 3537: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheschemaattributeasitisusedinthedataObjectelement:

<xsf:dataObjects><xsf:dataObjectname="EmployeeNames"schema="EmployeeNames.xsd"initOnLoad="yes"><xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter> </xsf:query> </xsf:dataObject> </xsf:dataObjects>

Page 3538: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3539: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

schemaAttribute(importSourceElement)

IdentifiestheXMLSchemafilethatshouldbeusedduringthemergeoperationtovalidatetheformbeingmerged.

Page 3540: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdFileName

Page 3541: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheschemaattributeisarequiredattributeoftheimportSourceelement.

Ifthesourcedocumenttobemergedbelongstothespecifiedschema,thespecifiedparametersareusedformegingintothecurrentform.Iftheschemaattributeisnotspecified,a"SchemaXSDnotfound"errorisreturned.

Page 3542: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheschemaattributeasitusedintheimportSourceelement:

<xsf:importParametersenabled="yes"<xsf:importSourcename="MyForm"schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

Page 3543: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

scriptLanguageAttribute

IdentifiesthenameofthescriptinglanguageusedtoimplementthebusinesslogicoftheMicrosoftOfficeInfoPath2003form.

Page 3544: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdScriptLanguage

Page 3545: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThescriptLanguageattributeisanoptionalattributeofthesolutionPropertieselement.

InfoPathsupportsthefollowingvaluesforthisattribute:"JavaScript","JScript",and"VBScript".

Page 3546: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthescriptLanguageattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.0.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

Page 3547: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3548: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

selectAttribute

AnXPathqueryexpressionthatreturnsoneormoredatanodesthatcontainusernames.

Page 3549: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3550: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptiongetUserNameFromData RetrievesausernamebyusinganXPath

queryofthedatainthemaindatasourceorinasecondarydatasource.

Page 3551: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="select"type="xsd:string"use="required"></xsd:attribute>

Page 3552: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3553: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheselectattributeasitisusedinthegetUserNameFromDataelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="Domain\username1"memberOf="A"/><xsf:userNamename="Domain\username2"memberOf="B"/><xsf:groupname="Domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

Page 3554: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

sendAsStringAttribute

SpecifiesthatthedataissubmittedasastringthroughthewebServiceAdapterdataadapter.

Page 3555: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3556: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionpartFragmentDefinesonesubstitutiongroupforaspecificpartofthe

inputSimpleObjectAccessProtocol(SOAP)message.

Page 3557: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="sendAsString"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3558: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksItmaybenecessarytosetthesendAsStringattributeto"yes"fordigitallysigneddata,becausethissettingpreservesnon-printingcharactersinthedata.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3559: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesendAsStringattributeasitisusedinthepartFragmentelement:

<xsf:partFragmentmatch="/dfs:myFields/dfs:dataFields/s0:IsPrime/s0:inValue"replaceWith=/dfs:myFields/dfs:dataFields/s0:IsPrime"filter="."sendAsString="yes"/>

Page 3560: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3561: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

serviceUrlAttribute

ContainstheWebserviceUniformResourceLocator(URL)towhichtherequestshouldbesent.

Page 3562: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3563: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheserviceUrlattributeisarequiredattributeoftheoperationelement.

Page 3564: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheserviceUrlattributeasitisusedintheoperationelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

Page 3565: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3566: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

serviceUrlAttribute(hwsOperationElement)

SpecifiestheUniformResourceLocator(URL)oftheMicrosoftBizTalk2004HumanWorkflowServices(HWS)Webservice.

Page 3567: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3568: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionhwsOperation DefinestheHWSoperationtype,suchasaddingan

actiontoanewactivityflow,addinganactiontoanexistingactivityflow,orrespondingtoatask.

Page 3569: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="serviceUrl"type="xsd:string"use="required"></xsd:attribute>

Page 3570: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3571: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheserviceUrlattributeasitisusedinthehwsOperationelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

Page 3572: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 3573: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

sharepointGuidAttribute

ContainstheGUIDoftheSharePointlist.

Page 3574: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3575: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationneeded

toqueryaSharePointlistorlibrary.

Page 3576: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="sharepointGuid"type="xsd:string"use="required"></xsd:attribute>

Page 3577: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3578: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesharepointGuidattributeasitisusedinthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl=”http://xyzco/reports/”sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="XyzReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

Page 3579: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3580: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

sharepointNameAttribute

ContainsthenameofafieldinaSharePointlist.

Page 3581: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3582: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionfield Containsfieldmappinginformationforeachfieldina

SharePointlistandthecorrespondingnameusedinMicrosoftOfficeInfoPath2003ServicePack1.

Page 3583: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="sharepointName"type="xsd:string"use="required"></xsd:attribute>

Page 3584: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3585: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesharepointNameattributeasitisusedinthefieldelement:

<xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"isLookup="no"></xsf:field>

Page 3586: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

shortMessageAttribute

Identifiestheshorterrormessagetoreturnincaseofinvaliddata.

Page 3587: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3588: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheshortMessageattributeisarequiredattributeoftheerrorMessageelement.

ThisisdisplayedinaScreenTipinthedefaulterroruserinterface.Formodalerrors,thisattributeisignoredandthedetailedmessageisusedinstead.Maximumlengthoftheerrormessageis127characters.

Page 3589: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheshortMessageattributeasitisusedintheerrorMessageelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

Page 3590: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3591: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

showErrorOnAttribute

IdentifiesXMLDocumentObjectModel(DOM)nodes(withinthecontextoftheexpressioncontextXMLDOMnode)onwhichtheerrorshouldbedisplayedwhentheformisfilledout.

Page 3592: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3593: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheshowErrorOnattributeisanoptionalattributeoftheerrorConditionelement.

Contains(relativetoexpressioncontextXMLDOMnode)anXPathexpression.Defaultis"."Thisisthesameastheexpressioncontext.

Page 3594: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheshowErrorOnattributeasitisusedintheerrorConditionelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

Page 3595: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

showIfAttribute

Specifiestheeditingcontextofthebutton.

Page 3596: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 3597: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheshowIfattributeisanoptionalattributeofthebuttonelement.

Allowedvaluesinclude"always","enabled",and"immediate".Defaultvalueis"always".Onlyappliestobuttonsusedwitheditingcomponents.IftheshowIfattributeissetto"enabled",thenthebuttonisvisibleonlyiftheactioniscontextuallyenabled.IftheshowIfattributeissetto"immediate",thenthebuttonisvisibleonlyiftheactioniscontextuallyimmediate.

Page 3598: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheshowIfattributeasitisusedinthebuttonelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="immediate"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="immediate"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

Page 3599: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3600: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

showMenuItemAttribute

DisplaysamenuitemintheInfoPathViewmenuandaddsacheckmarknexttotheitemwhenitisinuse.

Page 3601: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3602: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionview ContainsinformationaboutanInfoPathview.

Page 3603: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="showMenuItem"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3604: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheshowMenuItemattributeisanoptionalattributeoftheviewelement.Thedefaultvalueis"yes".

IftheshowMenuItemattributeforamenuitemintheViewmenuissetto"yes",theitemappearsintheViewmenuandhasacheckmarknexttoitwhenitisinuse.Themenuitemappearswiththecaptionthathasbeendefinedforitandintheorderspecifiedintheformdefinitionfile(.xsf).IftheshowMenuItemattributeisnotpresentorissetto"no",themenuitemdoesnotappearintheViewmenu.UserscanstilladditemstotheViewmenubycustomizingit,butsuchitemswillnotdisplayacheckmarkwhentheyareinuse.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3605: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheshowMenuItemattributeasitisusedintheviewelement:

<xsf:viewname="View1"caption="Firstview"showMenuItem="yes"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane></xsf:view>

Page 3606: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

showSignatureReminderAttribute

Specifieswhetheradialogboxshouldbedisplayedtoprompttheusertodigitallysignthedocumentbeforesubmittingit.

Page 3607: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 3608: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheshowSignatureReminderattributeisanoptionalattributeofthesubmitelement.

Valuesinclude"yes"and"no".Thedefaultvalueis"no".Ifsetto"yes"andtheformisnotdigitallysignedwhenausertriestosubmitit,thedialogboxisdisplayed.

Page 3609: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheshowSignatureReminderattributeasitisusedinthesubmitelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

Page 3610: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

showStatusDialogAttribute

Specifieswhetherthestatusdialogboxshouldbeshownafterthesubmitoperation.

Page 3611: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 3612: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheshowStatusDialogattributeisanoptionalattributeofthesubmitelement.

Valuesinclude"yes"and"no".Thedefaultvaluesis"yes".

IftheshowStatusDialogattributeissetto"yes"andnocustommessagesaredefined(usingtheerrorMessageorsuccessMessageelements),thentheMicrosoftOfficeInfoPath2003defaultsubmitmessagesaredisplayed.

Page 3613: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheshowStatusDialogattributeasitisusedinthesubmitelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

Page 3614: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3615: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

signatureLocationAttribute

ContainsanXPathexpressionthatpointstotheXMLDocumentObjectModel(DOM)nodewithintheform'sunderlyingXMLdocumentthatisusedforstoringthedigitalsignature.

Page 3616: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3617: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesignatureLocationattributeisarequiredattributeofthedocumentSignatureselement.

Page 3618: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesignatureLocationattributeasitisusedinthedocumentSignatureselement:

<xsf:documentSignaturessignatureLocation="/employees/my:signatures1"></xsf:documentSignatures>

Page 3619: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3620: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

signatureLocationAttribute(signedDataBlockElement)

ContainsanXPathexpressionthatpointstotheXMLDocumentObjectModel(DOM)nodeintheform'sunderlyingXMLdocumentthatisusedforstoringthedigitalsignature.

Page 3621: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3622: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsignedDataBlock Definesanodesetintheform'sunderlyingXML

documenttowhichadigitalsignaturecanbeapplied.

Page 3623: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="signatureLocation"type="xsd:string"use="required"></xsd:attribute>

Page 3624: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3625: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesignatureLocationattributeasitisusedinthesignedDataBlockelement:

<xsf:documentSignatures><xsf:signedDataBlockname=”main”data=”my:myfields/my:subtree1|my:myfields/my:subtree2”signatureLocation=”my:mifields/sig:signatures/main”mode=”countersign”><xsf:message>Bypressingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

Page 3626: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3627: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

siteUrlAttribute

ContainstheUniformResourceLocator(URL)ofaSharePointsite.

Page 3628: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3629: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationneeded

toqueryaSharePointlistorlibrary.

Page 3630: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="siteUrl"type="xsd:string"use="required"></xsd:attribute>

Page 3631: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3632: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesiteUrlattributeasitisusedinthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl=”http://xyzco/reports/”sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="XyzReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

Page 3633: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

soapActionAttribute

ContainsthevalueoftheSOAPActionattributeintheSimpleObjectAccessProtocol(SOAP)requestmessage.

Page 3634: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3635: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesoapActionattributeisarequiredattributeoftheoperationelement.

Page 3636: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesoapActionattributeasitisusedintheoperationelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

Page 3637: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3638: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

solutionFormatVersionAttribute

Identifiestheversionnumberthatrepresentstheformatoftheformdefinitionfile(.xsf).

Page 3639: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdSolutionVersion

Page 3640: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesolutionFormatVersionattributeisarequiredattributeofthexDocumentClasselement.

Itsformatis####.####.####.####(major.minor.revision.build).Theversionnumberofthe.xsffileallowsMicrosoftOfficeInfoPath2003todeterminewhetherthecurrentformiscompatiblewiththeproductversioninwhichitisbeingopened.

Page 3641: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesolutionFormatVersionattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

Page 3642: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3643: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

solutionURIAttribute

TheUniformResourceIdentifier(URI)ofthesolutiononwhichthenewformwillbebased.

Page 3644: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:anyURI

Page 3645: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionopenNewDocumentActionDefinesaformcreateaction.

Page 3646: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="solutionURI"type="xsd:anyURI"use="required"></xsd:attribute>

Page 3647: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3648: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesolutionURIattributeasitisusedintheopenNewDocumentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 3649: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

solutionVersionAttribute

Identifiestheversionnumberoftheform.

Page 3650: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdSolutionVersion

Page 3651: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesolutionVersionattributeisanoptionalattributeofthexDocumentClasselement.

Itsformatis####.####.####.####(major.minor.revision.build).

Page 3652: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesolutionVersionattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

Page 3653: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3654: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

sourceAttribute

ContainsthenameoftheresourcefileintheformtemplatethatcontainstheXMLSchemafortheinputSimpleObjectAccessProtocol(SOAP)messageoftheselectedoperationoftheWebservice.

Page 3655: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3656: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesourceattributeisarequiredattributeoftheinputelement.

Page 3657: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesourceattributeasitisusedintheinputelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"><xsf:partFragmentmatch="/dfs:myFields/dfs:dataFields/s0:IsPrime/s0:inValue"replaceWith="/dfs:myFields/dfs:dataFields/s0:IsPrime"/></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

Page 3658: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3659: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

srcAttribute

ProvidesarelativeURLwithintheformtemplatetothespecifiedscriptsourcefile.

Page 3660: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdFileName

Page 3661: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesrcattributeisarequiredattributeofthescriptelement.

Page 3662: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesrcattributeasitisusedinthescriptelement:

<xsf:scriptslanguage="jscript"><xsf:scriptsrc="myscripts.js"/></xsf:scripts>

Page 3663: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

submitAllowedAttribute(adoAdapterElement)

Specifieswhetherdatacanbesubmittedtothedatasourcethroughthesubmitmethodofthedataadapterobject.

Page 3664: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 3665: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesubmitAllowedattributeisanoptionalattributeoftheadoAdapterelement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"no".

Page 3666: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesubmitAllowedattributeasitisusedintheadoAdapterelement:

<xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

Page 3667: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3668: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

submitAllowedAttribute(davAdapterElement)

Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.

Page 3669: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3670: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptiondavAdapterContainsinformationneededtosubmitInfoPathformstoa

serverrunningMicrosoftWindowsSharePointServicesortoaWeb-basedDistributedAuthoringandVersioning(WebDAV)server.

Page 3671: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3672: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevalueofthesubmitAllowedattributeisalwayssetto"yes"forthedavAdapterelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3673: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesubmitAllowedattributeasitisusedinthedavAdapterelement:

<xsf:davAdaptername="SubmitToSharePoint"overwriteAllowed="yes"<xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/><xsf:folderURLvalue="http://some_server/some_doc_lib"/></xsf:davAdapter>

Page 3674: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

submitAllowedAttribute(emailAdapterElement)

Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.

Page 3675: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3676: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionemailAdapter ContainstheinformationneededtosubmitanInfoPath

formasanattachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

Page 3677: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3678: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevalueofthesubmitAllowedattributeisalwayssetto"yes"fortheemailAdapterelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3679: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesubmitAllowedattributeasitisusedintheemailAdapterelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="[email protected]"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="[email protected]"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

Page 3680: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

submitAllowedAttribute(hwsAdapterElement)

Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.

Page 3681: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3682: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionhwsAdapter DefinestheMicrosoftBizTalk2004HumanWorkflow

Services(HWS)dataadapter,whichcanbeusedtostartorextendanactivityfloworrespondtoatask.

Page 3683: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3684: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevalueofthesubmitAllowedattributeisalwayssetto"yes"forthehwsAdapterelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3685: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesubmitAllowedattributeasitisusedinthehwsAdapterelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

Page 3686: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 3687: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

submitAllowedAttribute(sharepointListAdapterElement)

Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.

Page 3688: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3689: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationneeded

toqueryaSharePointlistorlibrary.

Page 3690: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3691: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesubmitAllowedattributeisomittedforthesharepointListAdapterelement,correspondingtoadefaultvalueof"no".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3692: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesubmitAllowedattributeasitisusedinthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl=”http://xyzco/reports/”sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="XyzReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

Page 3693: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

submitAllowedAttribute(webServiceAdapterElement)

Specifieswhetherdatacanbesubmittedtothedatasourcethroughthesubmitmethodofthedataadapterobject.

Page 3694: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 3695: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThesubmitAllowedattributeisanoptionalattributeofthewebServiceAdapterelement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"no".

Page 3696: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthesubmitAllowedattributeasitisusedinthewebServiceAdapterelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

Page 3697: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3698: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

targetAttribute(calculatedFieldElement)

ContainstheXPathlocationwheretheresultoftheexpressionattributewillbestored.

Page 3699: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3700: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptioncalculatedField Definesanindividualcalculation,includingtheformula,

whenthecalculationistobeperformed,andwheretheresultwillbestored.

Page 3701: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="target"type="xsd:string"use="required"></xsd:attribute>

Page 3702: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3703: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetargetattributeasitisusedinthecalculatedFieldelement:

<xsf:calculations><xsf:calculatedFieldtarget="/my:myFields/my:average"expression="xdMath:Avg(../my:expenses/my:expense/my:amount)"refresh="onChange"/></xsf:calculations>

Page 3704: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3705: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

targetFieldAttribute

ContainsanXPathexpressionforthetargetnode.

Page 3706: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3707: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionassignmentAction Definesanactiontosetthevalueofafield.

Page 3708: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="targetField"type="xsd:string"use="required"></xsd:attribute>

Page 3709: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetargetFieldattributeidentifiesthenodethatwillreceivethevaluefromtheexpressionattribute.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3710: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetargetFieldattributeasitisusedintheassignmentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 3711: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

taskpaneVisibleAttribute

SpecifieswhethertheWorkflowtaskpaneisvisible.

Page 3712: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3713: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionhwsWorkflow ContainstheinformationtoenabletheWorkflowtask

paneandtoenableindividualactionsandtasksassociatedwithaMicrosoftBiztalk2004HumanWorkflowServices(HWS)server.

Page 3714: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="taskpaneVisible"type="xsf:xdYesNo"></xsd:attribute>

Page 3715: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedefaultvalueforthetaskpaneVisibleattributeis"yes".ThetaskpaneVisibleattributeisanoptionalattributeofthehwsWorkflowelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3716: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetaskpaneVisibleattributeasitisusedinthehwsWorkflowelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

Page 3717: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3718: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

taskTypeIDAttribute

TheuniqueIDoftheMicrosoftBizTalkServer2004HumanWorkflowServices(HWS)workflowtask.

Page 3719: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3720: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptiontask TheHWStaskinformationenabledfortheform.

Page 3721: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="taskTypeID"type="xsd:string"use="required"></xsd:attribute>

Page 3722: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetaskTypeIDattributeusesanamespacetouniquelyidentifyataskbutdoesnotrepresentthecurrentinstanceofthetaskbeingperformed.ThecurrentinstanceofthetaskisstoredintheXMLinstancefile.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3723: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetaskTypeIDattributeasitisusedinthetaskelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

Page 3724: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 3725: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

tooltipAttribute

ProvidestheScreenTiptexttobeusedforthebutton.

Page 3726: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdTitle

Page 3727: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetooltipattributeisanoptionalattributeofthebuttonelement.

Thisattributeappliesonlytobuttonsusedonatoolbar.

Page 3728: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetooltipattributeasitisusedinthebuttonelement:

<xsf:toolbarcaption="CDCollectionToolbar"name="CDCollectionToolbar"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="NewCD"showIf="always"tooltip="InsertaCD."></xsf:button>...</xsf:toolbar>

Page 3729: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

topMarginAttribute

Specifiesthetopmarginwhenprintingaview.

Page 3730: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3731: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetopMarginattributeisanoptionalattributeoftheprintSettingselement.

ThetopMarginattributemustbegreaterthanorequaltozero.

Page 3732: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetopMarginattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

Page 3733: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3734: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

transformAttribute(importSourceElement)

Identifiesthe.xsltfilethatshouldbeusedduringthemergeoperationwhenthesourceform(theonethatisbeingmergedin)matchestheXMLSchemaspecifiedinthecorrespondingschemaattribute.

Page 3735: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdFileName

Page 3736: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetransformattributeisarequiredattributeoftheimportSourceelement.

Page 3737: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetransformattributeasitisusedintheimportSourceelement:

<xsf:importParametersenabled="yes"<xsf:importSourcename="MyForm"schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

Page 3738: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3739: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

transformAttribute(mainpaneElement)

SpecifiestherelativeURLtotheXSLTransformation(XSLT)thatisusedfortheview.

Page 3740: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdFileName

Page 3741: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetransformattributeisarequiredattributeofthemainpaneelement.

Page 3742: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetransformattributeasitisusedinthemainpaneelement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

Page 3743: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3744: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

transformAttribute(useTransformElement)

Specifiesthe.xsltfilenamerelativetotheformtemplate.

Page 3745: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdFileNamexsf:xdEmptyString

Page 3746: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetransformattributeisarequiredattributeoftheuseTransformelement.Itsmaximumlengthis64characters.

Page 3747: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingexampleshowsthetransformattributeasitisusedintheuseTransformelement:

<xsf:documentVersionUpgrade><xsf:useTransformtransform="upgrade.xsl"minVersionToUpgrade="0.0.0.0"maxVersionToUpgrade="1.0.0.5"/></xsf:documentVersionUpgrade>

Page 3748: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3749: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

treatBlankValueAsZeroAttribute

Specifieswhetherablankfieldshouldbecalculatedwithavalueofzero.

Page 3750: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3751: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptioncalculations Containsdefinitionsforcalculationsperformedintheform,

andspecifieshowblankvaluesarehandled.

Page 3752: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="treatBlankValueAsZero"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3753: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksDefaultis"yes".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3754: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetreatBlankValueAsZeroattributeasitisusedinthecalculationselement:

<xsf:calculations><xsf:calculatedFieldtarget="/my:myFields/my:average"expression="xdMath:Avg(../my:expenses/my:expense/my:amount)"refresh="onChange"/>treatBlankValueAsZero=”yes”/></xsf:calculations>

Page 3755: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3756: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

trustLevelAttribute

Specifiesthetrustlevelofaformtemplate.

Page 3757: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdTrustLevel

Page 3758: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionxDocumentClass Therootelementoftheformdefinitionfile(.xsf).

Containsallotherelementsandattributesoftheformdefinitionfile.

Page 3759: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="trustLevel"type="xsf:xdTrustLevel"use="optional"></xsd:attribute>

Page 3760: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfthetrustLevelattributeispresentalongwiththerequireFullTrustattributeintheformdefinitionfile,andtherequireFullTrustattributeissetto"yes",thentherequireFullTrustattributetakesprecedence.Aformtemplatethatisnotpermittedfulltrust(becauseitlackspropercertificate,installation,orregistration)willfailtoloadineditmode,andawarningwillbedisplayed.Iftheformtemplateispermittedfulltrust,itwillloadandrunproperlyinthefulltrustsecurityzone.

Thedefaultvalueis"domain".IfthetrustLevelattributeisnotpresent,thedefaultvalueisalso"domain".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3761: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetrustLevelattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:schemas-microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">dataFormSolution="yes"requireFullTrust="yes"trustLevel="restricted"trustSetting="manual"publishUrl="http://MyServer/InfoPathTemplates/MyTemplate.xsn">...</xsf:xDocumentClass>

Page 3762: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3763: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

trustSettingAttribute

Specifiesthetrustsettingofaformtemplate.

Page 3764: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdManualAuto

Page 3765: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionxDocumentClass Therootelementoftheformdefinitionfile(.xsf).

Containsallotherelementsandattributesoftheformdefinitionfile.

Page 3766: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="trustSetting"type="xsf:xdManualAuto"use="optional"></xsd:attribute>

Page 3767: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThedefaultvalueis"manual".IfthetrustSettingattributeisnotpresent,thedefaultvalueisalso"manual".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3768: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetrustSettingattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:schemas-microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">dataFormSolution="yes"requireFullTrust="yes"trustLevel="restricted"trustSetting="manual"publishUrl="http://MyServer/InfoPathTemplates/MyTemplate.xsn">...</xsf:xDocumentClass>

Page 3769: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3770: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

typeAttribute(editWithElement)

SpecifiesthetypeofeditingforthefieldsthatmatchtheXPathexpressionspecifiedbytheitemattributeofthexmlToEditelement.

Page 3771: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:enumeration

Page 3772: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetypeattributeisanoptionalattributeoftheeditWithelement.

ThetypeattributeisusedwiththexFieldeditingcomponent,anditsupportsthefollowingvalues:"plain","plainMultiline","formatted","formattedMultiline",and"rich".Thedefaultvalueis"plain".

NotethatifthematchedXMLDocumentObjectModel(DOM)nodedoesnotsupportthefulleditingservicesspecified,theeffectivetypeisdowngradedappropriately(thismeansdowngradingto"plain").Forexample,anattributenodewillbehaveasplainevenifsettorich.OnlydatathatisinaCDATAsection,orthatcorrespondstoXHTML,cansupportvaluesotherthan"plain".

Page 3773: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetypeattributeasitisusedintheeditWithelement:

<xsf:xmlToEditname="Label_4"item="/CustomUISample/CDCollection/CD/Label"><xsf:editWithtype="rich"autoComplete="no"component="xField"></xsf:editWith></xsf:xmlToEdit>

Page 3774: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

typeAttribute(errorMessageElement)

Identifiesthetypeoferrormessagetoreturn.

Page 3775: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 3776: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetypeattributeisanoptionalattributeoftheerrorMessageelement.

Allowedvaluesare"modeless"and"modal".Defaultvalueis"modeless".

Adialogboxwiththelongmessageisreturnedfor"modal"errors.Whenthedialogboxisclosed,thefieldismarkedwithadashedredbordertoindicatethatthevalueisinvalid.Ausercanreadtheerrormessagebyright-clickingthefield.

For"modeless"errors,nodialogboxisdisplayed.Thefieldismarkedwithadashedredbordertoindicatethatthevalueisinvalid.Ausercanreadtheerrormessagebyright-clickingthefield.

NoteIfthefieldisinvalidasaresultofscriptingcodeorbecauseitwasinvalidtobeginwith,buthasnotbeenedited,thenitwillbemarkedwitharedunderline.

Page 3777: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetypeattributeasitisusedintheerrorMessageelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

Page 3778: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3779: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

typeAttribute(fieldElement)

IdentifiesthestandardXMLSchemadatatype.

Page 3780: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 3781: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetypeattributeisarequiredattributeofthefieldelement.

Page 3782: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetypeattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

Page 3783: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

typeAttribute(hwsOperationElement)

SpecifiestheMicrosoftBizTalkServer2004HumanWorkflowServices(HWS)operationtype.

Page 3784: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3785: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionhwsOperation DefinestheHWSoperationtype,suchasaddingan

actiontoanewactivityflow,addinganactiontoanexistingactivityflow,orrespondingtoatask.

Page 3786: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="type"type="xsd:string"use="required"></xsd:attribute>

Page 3787: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheallowedHWSoperationtypesare:

addActionToNewActivityFlowStartsanewworkflow.

addActionToActivityFlowStartsanewworkflow,orifoneexists,extendstheworkflow.

sendTaskResponseRespondstoatask.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3788: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetypeattributeasitisusedinthehwsOperationelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

Page 3789: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 3790: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3791: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

typeAttribute(propertyElement)

Definesthetypeoftheproperty.

Page 3792: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:QName

Page 3793: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThetypeattributeisarequiredattributeofthepropertyelement.

AllsimpleXMLSchemadatatypesareallowed.

Page 3794: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetypeattributeasitisusedinthepropertyelement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

Page 3795: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3796: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

typeIDAttribute

Containsthegloballyuniqueidentifier(GUID)fortheMicrosoftBizTalkServer2004HumanWorkflowServices(HWS)operation.

Page 3797: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3798: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionhwsOperation DefinestheHWSoperationtype,suchasaddingan

actiontoanewactivityflow,addinganactiontoanexistingactivityflow,orrespondingtoatask.

Page 3799: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="typeID"type="xsd:string"use="required"></xsd:attribute>

Page 3800: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheGUIDisautomaticallygenerateduponsubmitofthehwsAdapterelement,anditupdatestheprocessinginstructionsoftheXMLinstancefile.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3801: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthetypeIDattributeasitisusedinthehwsOperationelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

Page 3802: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 3803: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3804: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

uiAttribute(exportToExcelElement)

SetswhethertheusercanexportthecontentsoftheformtoaMicrosoftOfficeExcel2003workbook.

Page 3805: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdEnabledDisabled

Page 3806: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionexportToExcel Specifieswhethertheusercanusetheform'smenus,

toolbars,orkeyboardshortcutstoexporttheformtoanMicrosoftOfficeExcel2003workbook.

Page 3807: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute>

Page 3808: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksSettingthisattributetoavalueotherthan"enabled"or"disabled"willresultinanerrormessagewhenyouattempttoopentheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3809: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheuiattributeasitisusedintheexportToExcelelement:

<xsf:exportToExcel ui="disabled"/>

Page 3810: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3811: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

uiAttribute(exportToWebElement)

SetswhethertheusercanexportthecontentsoftheformtoaWebpage.

Page 3812: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdEnabledDisabled

Page 3813: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionexportToWeb Specifieswhethertheusercanusetheform'smenus,

toolbars,orkeyboardshortcutstoexporttheformtoaWebpage.

Page 3814: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute>

Page 3815: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksSettingthisattributetoavalueotherthan"enabled"or"disabled"willresultinanerrormessagewhenyouattempttoopentheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3816: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheuiattributeasitisusedintheexportToWebelement:

<xsf:exportToWeb ui="disabled"/>

Page 3817: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3818: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

uiAttribute(printElement)

Setswhethertheusercanprinttheform.

Page 3819: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdEnabledDisabled

Page 3820: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionprint Specifieswhethertheusercanusetheform'smenus,toolbars,

orkeyboardshortcutstoprinttheform

Page 3821: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute>

Page 3822: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksSettingthisattributetoavalueotherthan"enabled"or"disabled"willresultinanerrormessagewhenyouattempttoopentheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3823: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheuiattributeasitisusedintheprintelement:

<xsf:printui="disabled"/>

Page 3824: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3825: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

uiAttribute(saveElement)

Setswhethertheusercansavetheform.

Page 3826: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdEnabledDisabled

Page 3827: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionsave Specifieswhethertheusercanusetheform'smenus,toolbars,

orkeyboardshortcutstosavetheform.

Page 3828: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute>

Page 3829: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksSettingthisattributetoavalueotherthan"enabled"or"disabled"willresultinanerrormessagewhenyouattempttoopentheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3830: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheuiattributeasitisusedinthesaveelement:

<xsf:saveui="disabled"/>

Page 3831: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3832: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

uiAttribute(sendMailElement)

Setswhethertheusercansendtheformasane-mailattachment.

Page 3833: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdEnabledDisabled

Page 3834: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionsendMail Specifieswhethertheusercanusetheform'smenus,

toolbars,orkeyboardshortcutstosendtheformasane-mailattachment.

Page 3835: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute>

Page 3836: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksSettingthisattributetoavalueotherthan"enabled"or"disabled"willresultinanerrormessagewhenyouattempttoopentheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3837: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheuiattributeasitisusedinthesendMailelement:

<xsf:sendMailui="disabled"/>

Page 3838: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3839: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

urlAttribute

ContainstheUniformResourceLocator(URL)foraMicrosoftBizTalk2004HumanWorkflowServices(HWS)Webservice.

Page 3840: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3841: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionlocation ThelocationoftheHWSWebservice.

Page 3842: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="url"type="xsd:string"use="required"></xsd:attribute>

Page 3843: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheurlattributeisarequiredattributeofthelocationelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3844: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheurlattributeasitisusedinthelocationelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

Page 3845: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

useDataSetAttribute

SpecifieswhetheranadapterwillsupportanADO.NETDataSet.

Page 3846: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3847: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionwebServiceAdapter DefinesaWebservicedataadapterthatretrieves

datafromaWebserviceorsubmitsdatatoaWebservice.

Page 3848: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="useDataSet"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3849: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksDefaultis"no".

UseoftheuseDataSetattributerequiresMicrosoftOfficeInfoPath2003ServicePack1.

AnADO.NETDataSetcannotbeusedasaqueryparameterforthewebServiceAdapterelementoranyotherdataadapter.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3850: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheuseDataSetattributeasitisusedinthewebServiceAdapterelement:

<xsf:webServiceAdapterwsdlUrl="http://www.contoso.com/DataSet.asmx?WSDL"queryAllowed="yes"useDataSet="yes">...</xsf:webServiceAdapter>

Page 3851: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3852: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

useFilterAttribute

Indicatestheuserwantsafilterwidget.

Page 3853: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:simpleType

Page 3854: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptioneditWith (Optionalelement)Specifiesaninstanceofanediting

component,andprovidesthecorrespondingparameterstodetermineitsexactbehavior.

Page 3855: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="useFilter"use="optional"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:enumerationvalue="yes"/><xsd:enumerationvalue="no"/></xsd:restriction></xsd:simpleType></xsd:attribute>

Page 3856: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheuseFilterattributeisanoptionalattributeoftheeditWithelement.Itsdefaultvalueis"no".Iftheuserselectsthefilterwidgetcheckboxinthepropertydialogofarepeatingsectionorrepeatingtable,andtheuseFilterattributeissetto"yes",thewidgetIconattributeissetto"Filter".TheuseFilterattributeisonlyapplicableforrepeatingsectionsandtables.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3857: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheuseFilterattributeasitisusedintheeditWithelement:

<editWithcomponent="xCollection"widgetIcon="filter|standard"useFilter="yes|no"filterDependency="xpath1|xpath2|xpath3>

Page 3858: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

useScriptHandlerAttribute

SpecifieswhethertousetheeventhandlerdefinedfortheOnMergeRequesteventwhenimporting(merging)forms.

Page 3859: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdYesNo

Page 3860: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionimportParameters Containsalltheparametersthatdefinehowthe

import(merge)formsfeatureworksfortheform.

Page 3861: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="useScriptHandler"type="xsf:xdYesNo"use="optional"></xsd:attribute>

Page 3862: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfyoucreateaneventhandlerfortheOnMergeRequesteventofaformtemplate,youmustsettheuseScriptHandlerattributeto"yes"beforeitwillrun.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3863: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheuseScriptHandlerattributeasitisusedintheimportParameterselement:

<xsf:importParametersenabled="yes"useScriptHandler="yes"><xsf:importSourcename="MySource"schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

Page 3864: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueAttribute(attachmentFileNameElement)

ContainsthevalueoftheattachmentFileNameelement.

Page 3865: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3866: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionattachmentFileName Containsthefilenameofthefileattachmenttobe

includedwithane-mailmessagewhentheformissubmittedusingtheemailAdapterelement.

Page 3867: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

Page 3868: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIfthevalueattributeisanemptystring,thee-mailmessagewillnotincludeafileattachment.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3869: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueattributeasitisusedintheattachmentFileNameelement:

<xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/>

Page 3870: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueAttribute(attributeDataElement)

Specifiesthevalueoftheattributetobeinserted.

Page 3871: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3872: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevalueattributeisarequiredattributeoftheattributeDataelement.

Page 3873: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueattributeasitisusedintheattributeDataelement:

<xsf:editWithcomponent="xOptional"><xsf:fragmentToInsert><xsf:chooseFragmentparent="report"><xsf:attributeDataattribute="author"value="authorname"/></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith>

Page 3874: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueAttribute(bccElement)

Specifiesthevalueofthebccelement,asaliteralstringorasanexpressionbasedonthevalueTypeattribute.

Page 3875: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3876: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionbcc Containstherecipientinformationforthebcclineofane-mail

messagewhentheformissubmittedusingtheemailAdapterelement.

Page 3877: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

Page 3878: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksMultipleaddressesonthebcclineofane-mailmessagemustbeseparatedbysemicolons.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3879: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueattributeasitisusedinthebccelement:

<xsf:bccvalue="[email protected]"valueType="literal"/>

Page 3880: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueAttribute(ccElement)

Specifiesthevalueoftheccelement,asaliteralstringorasanexpressionbasedonthevalueTypeattribute.

Page 3881: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3882: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptioncc Containstherecipientinformationforthecclineofthee-mail

messagewhentheformissubmittedusingtheemailAdapterelement.

Page 3883: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

Page 3884: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksMultipleaddressesonthecclineofane-mailmessagemustbeseparatedbysemicolons.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3885: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueattributeasitisusedintheccelement:

<xsf:ccvalue="my:ccNames"valueType="expression"/>

Page 3886: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3887: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueAttribute(fileNameElement)

SpecifiesthevalueofthefileNameelement,asaliteralstringorasanexpressionbasedonthevalueTypeattribute.

Page 3888: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3889: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionfileName ContainsthenameofthefileasaliteralstringorXPath

expression.

Page 3890: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3891: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueattributeasitisusedinthefileNameelement:

<xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/>

Page 3892: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3893: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueAttribute(folderURLElement)

SpecifiestheUniformResourceLocator(URL)oftheWeb-basedDistributedAuthoringandVersioning(WebDAV)serverorserverthatisrunningMicrosoftWindowsSharePointServicestowhichthefileissubmitted.

Page 3894: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3895: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionfolderURL ContainstheURLoftheservertowhichthefileissubmitted.

Page 3896: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

Page 3897: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheURLmustbeginwith"http://"or"https://".Othercommonprotocolswillcauseanerror.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3898: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueattributeasitisusedinthefolderURLelement:

<folderURLvalue="http://some_server/some_doc_lib"/>

Page 3899: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueAttribute(introElement)

Containsthevalueoftheintroelement.

Page 3900: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3901: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionintro Containstheintroductionforthee-mailmessagewhentheform

issubmittedusingtheemailAdapterelement.

Page 3902: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3903: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueattributeasitisusedintheintroelement:

<xsf:introvalue="Seebelow"/>

Page 3904: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3905: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueAttribute(propertyElement)

Forsimpleproperties,specifiesavaluefortheproperty.Forcomplexandmulti-valuedproperties,thespecifiedvalueisdefinedasacontainerXMLtreeusinganopencontentmodel.

Page 3906: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3907: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThevalueattributeisarequiredattributeofthepropertyelement.The.cabfilesthatareincludedinanInfoPathformpackagearelistedinthepackageandfileselementsofan.xsffile.AfileTypevalueof"ActiveX-CAB"identifiesthatthefileisa.cabfileaddedbythedesignerandindicatesthatthefileshouldbemanagedbytheActiveXsupportfeaturesofthedesigner.

Page 3908: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingareexamplesofthevalueattributeasitisusedinthepropertyelement:

<xsf:files><xsf:filename="example.cab"><xsf:fileProperties><xsf:propertyname="fileType"type="string"value="ActiveX-CAB"/><xsf:propertyname="timestamp"type="string"value="xyz"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

Page 3909: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueAttribute(subjectElement)

Containsthevalueofthesubjectelement,eitherasanexpressionorasaliteralstring.

Page 3910: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3911: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionsubject Containsthesubjectlineofthee-mailmessagewhentheform

issubmittedusingtheemailAdapterelement.

Page 3912: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3913: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueattributeasitisusedinthesubjectelement:

<xsf:subjectvalue="Myreport"valueType="literal"/>

Page 3914: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueAttribute(toElement)

Specifiesthevalueofthetoelement,asaliteralstringorasanexpressionbasedonthevalueTypeattribute.

Page 3915: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3916: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionto Parentelementthatcontainsthe"to"lineinformationofthe

emailAdapterelement.

Page 3917: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

Page 3918: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksMultipleaddressesonthe"to"lineofane-mailmessagemustbeseparatedbysemicolons.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3919: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueattributeasitisusedinthetoelement:

<xsf:tovalue="[email protected]"valueType="literal"/>

Page 3920: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3921: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueTypeAttribute(attachmentFileNameElement)

SpecifieswhetherthevalueattributeoftheattachmentFileNameelementshouldbeinterpretedasaliteralvalueoranXPathexpressionwhichreturnsavalue.

Page 3922: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdExpressionLiteral

Page 3923: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionattachmentFileName Containsthefilenameofthefileattachmenttobe

includedwithane-mailmessagewhentheformissubmittedusingtheemailAdapterelement.

Page 3924: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute>

Page 3925: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3926: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueTypeattributeasitisusedintheattachmentFileNameelement:

<xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/>

Page 3927: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3928: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueTypeAttribute(bccElement)

SpecifieswhetherthevalueattributeofthebccelementshouldbeinterpretedasaliteralvalueorasanXPathexpressionthatreturnsavalue.

Page 3929: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdExpressionLiteral

Page 3930: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionbcc Containstherecipientinformationforthebcclineofane-mail

messagewhentheformissubmittedusingtheemailAdapterelement.

Page 3931: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute>

Page 3932: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3933: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueTypeattributeasitisusedinthebccelement:

<xsf:bccvalue="[email protected]"valueType="literal"/>

Page 3934: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3935: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueTypeAttribute(ccElement)

SpecifieswhetherthevalueattributeoftheccelementshouldbeinterpretedasaliteralvalueorasanXPathexpressionthatreturnsavalue.

Page 3936: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdExpressionLiteral

Page 3937: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptioncc Specifiesthevalueoftheccelement,asaliteralstringorasan

expressionbasedonthevalueTypeattribute.

Page 3938: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute>

Page 3939: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3940: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueTypeattributeasitisusedintheccelement:

<xsf:ccvalue="my:ccNames"valueType="expression"/>

Page 3941: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3942: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueTypeAttribute(fileNameElement)

SpecifieswhetherthevalueofthefileNameelementshouldbeinterpretedasaliteralvalueorasanXPathexpressionthatreturnsavalue.

Page 3943: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdExpressionLiteral

Page 3944: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionfileName ContainsthenameofthefileasaliteralstringorasanXPath

expression.

Page 3945: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute>

Page 3946: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3947: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueTypeattributeasitisusedinthefileNameelement:

<xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/>

Page 3948: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3949: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueTypeAttribute(subjectElement)

SpecifieswhetherthevalueattributeofthesubjectelementshouldbeinterpretedasaliteralvalueorasanXPathexpressionthatreturnsavalue.

Page 3950: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdExpressionLiteral

Page 3951: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionsubject Containsthesubjectlineofane-mailmessagewhentheform

issubmittedusingtheemailAdapterelement.

Page 3952: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute>

Page 3953: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3954: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueTypeattributeasitisusedinthesubjectelement:

<xsf:subjectvalue="Myreport"valueType="literal"/>

Page 3955: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3956: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

valueTypeAttribute(toElement)

SpecifieswhetherthevalueattributeofthetoelementshouldbeinterpretedasaliteralvalueorasanXPathexpressionthatreturnsavalue.

Page 3957: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdExpressionLiteral

Page 3958: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element Descriptionto Parentelementthatcontainsthe"to"lineinformationofthe

emailAdapterelement.

Page 3959: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute>

Page 3960: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3961: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthevalueTypeattributeasitisusedinthetoelement:

<xsf:tovalue="[email protected]"valueType="literal"/>

Page 3962: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3963: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

versionAttribute

SpecifiestheActiveXcontrolversionnumber.

Page 3964: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 3965: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionallowedControl SpecifiestheActiveXcontrolsthatareallowedtobe

instantiated.

Page 3966: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="version"type="xsd:string"use="optional"></xsd:attribute>

Page 3967: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksIftheclsidattributeforanActiveXcontrolisincludedintheallowedControlelementinaformdefinitionfile(.xsf),butthecontrolisnotinstalledontheuser'scomputer,thecontrolwillbeinstalledautomaticallyifthecabFileattributeforthecontrolispresentandtheCABfileispresentintheformtemplatefile(.xsn)orinthesamedirectoryastheformdefinitionfile.Ifthecontrolisalreadyinstalledontheuser'scomputerbutisanearlierversionthantheonelistedintheversionattribute,theinstallprocessstillwillinitiateiftheCABfileforthecontrolispresent.IftheCABfileisnotpresentforsomereasonortheinstallationfailsorisstopped,theformwillnotopen.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3968: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheversionattributeasitisusedintheallowedControlelement:

<xsf:permissions><xsf:allowedControlcabFile="{84F32C01-78D8-4B93-8ED4-106DA70224C2}.cab”clsid="{84F32C01-78D8-4B93-8ED4-106DA70224C2}"version=”1,0,0,1”/><xsf:allowedControlclsid="{F08DF954-8592-11D1-B16A-00C0F0283630}"/></xsf:permissions>

Page 3969: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3970: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

viewAttribute

Containsthenameoftheviewthatisswitchedtoasaresultoftheruleelementaction.

Page 3971: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsf:xdViewName

Page 3972: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionswitchViewAction Definesaviewswitchaction.

Page 3973: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="view"type="xsf:xdViewName"use="required"></xsd:attribute>

Page 3974: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3975: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheviewattributeasitisusedintheswitchViewActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

Page 3976: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

viewableAttribute

Identifieswhetherthefieldshouldbeaddedtothedefaultview.

Page 3977: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsf:xdYesNo

Page 3978: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheviewableattributeisanoptionalattributeofthefieldelement.

Valuesinclude"yes"and"no".Thedefaultvalueis"no".

Page 3979: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheviewableattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

Page 3980: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3981: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

viewContextAttribute

SpecifiesastringthatidentifiesanHTMLelementintheview.

Page 3982: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3983: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksTheviewContextattributeisanoptionalattributeofthexmlToEditelement.

TheviewContextattributenamesanHTMLelementthathasthexd:CtrlIdattribute.Forexample,viewContext="myID"intheformdefinition(.xsf)filecorrespondstoxd:CtrlId="myID"intheXSLT/HTMLcodefortheview.

NoteIfthexd:CtrlIdattributeisnotusedintheXSLT/HTMLcodefortheview,thentheviewContextattributeisignored.

TheviewContextattributecanbeusedtodisambiguatecontrolswhentwoinstancesofthesamecontrolhavethesameXMLcontext(sothattheXMLcontextisidentical).Anexampleisatableofcontentswithchaptertitles,andbelow,thesamechaptersrepeatedwithfullcontent.TwoeditWithelementsforitem="chapter"butdifferentviewcontextscanspecifydistinctbehavior.

Page 3984: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleoftheviewContextattributeasitisusedinthexmlToEditelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample">viewContext="cdID"<xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

Page 3985: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3986: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

widgetIconAttribute

Specifieswhetheramodifiediconwillbeshownforfiltereditems.

Page 3987: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:simpleType

Page 3988: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptioneditWith (Optionalelement)Specifiesaninstanceofanediting

component,andprovidesthecorrespondingparameterstodetermineitsexactbehavior.

Page 3989: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="widgetIcon"use="optional"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:enumerationvalue="standard"/><xsd:enumerationvalue="filter"/></xsd:restriction></xsd:simpleType></xsd:attribute>

Page 3990: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThewidgetIconattributeisanoptionalattributeoftheeditWithelement.Itsdefaultvalueis"standard".

ThepropertiesdialogboxesforrepeatingsectionsandtableshaveaFilterDatabuttonontheDisplaytab.BelowtheFilterDatabuttonisacheckboxthatallowstheusertoselectwhetheramodifiediconwillbeshowntoindicatefiltereditems.Iftheuserappliesafilterandselectsthischeckbox,thewidgetIconattributeintheformdefinitionfile(.xsf)issetto"filter".ThewidgetIconattributeisonlyapplicableforrepeatingsectionsandtables.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 3991: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthewidgetIconattributeasitisusedintheeditWithelement:

<editWithcomponent="xCollection"widgetIcon="filter|standard"useFilter="yes|no"filterDependency="xpath1|xpath2|xpath3>

Page 3992: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3993: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

wsdlUrlAttribute

ContainstheUniformResourceLocator(URL)oftheWebServicesDescriptionLanguage(WSDL)filethatdescribestheWebservicespecification.

Page 3994: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 3995: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThewsdlUrlattributeisarequiredattributeofthewebServiceAdapterelement.

Page 3996: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthewsdlUrlattributeasitisusedinthewebServiceAdapterelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

Page 3997: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ShowAll

Page 3998: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

wsdlUrlAttribute(hwsAdapterElement)

ContainstheUniformResourceLocator(URL)oftheMicrosoftBizTalk2004HumanWorkflowServices(HWS)Webservice.

Page 3999: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Typexsd:string

Page 4000: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ParentElements

Element DescriptionhwsAdapter DefinestheHWSdataadaptertostartorextendanactivity

floworrespondtoatask.

Page 4001: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Definition

<xsd:attributename="wsdlUrl"type="xsd:string"use="required"></xsd:attribute>

Page 4002: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Page 4003: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthewsdlUrlattributeasitisusedinthehwsAdapterelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

Page 4004: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

Page 4005: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xmlnsAttribute

Definesthexsfnamespace.

Page 4006: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:string

Page 4007: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexmlnsattributeisarequiredattributeofthexDocumentClasselement,andisthestandardmechanismfordeclaringXMLnamespaces.

Page 4008: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthexmlnsattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

Page 4009: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

xmlToEditAttribute

SpecifiesthenameofanxmlToEditelement,forwhichthebuttonisused.

Page 4010: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

Type

xsd:NMTOKEN

Page 4011: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksThexmlToEditattributeisanoptionalattributeofthebuttonelement,butisrequiredforbuttonsusedwitheditingcomponents.

Page 4012: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

ExampleThefollowingisanexampleofthexmlToEditattributeasitisusedinthebuttonelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

Page 4013: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

XDocumentProperty(SaveEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeSaveEventobjectinanOnSaveRequestevent.

expression.XDocument

expressionRequired.ReturnsareferencetoaSaveEventobject.

Page 4014: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

Page 4015: Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to constrain and validate a form's underlying XML document files. View .xsl The presentation

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.