Sorry for late response, I worked out a different option to fulfill my business requirement during that time. But again am stuck with the same problem. This is for Infopath 2007 client form(not web form).
Am not a newbie and have been working with infopath for more than 4 years.
I will give the explanation my scenario,
custom XSD
<xs:element name="ConceptReviewDocument">
<xs:complexType>
<xs:sequence>
<xs:element name="MainNode">
<xs:complexType>
<xs:sequence><xs:any minOccurs="0" maxOccurs="unbounded" namespace="##any" processContents="lax"/></xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ConceptReview">
<xs:complexType>
<xs:sequence>
<xs:element name="RecordID" type="xs:string" nillable="false"/>
<xs:element name="BusinessUnit" type="xs:string" nillable="false"/>
........
once schema is defined I have used convert main datasource and pointed to the file.
The Bold portion is for adding elements with different namespace, and i have used this before ##any inorder to use contact selector field (as to work for my:person > Displayname, account id etc)..
Now coming to my problem, i have added a group and 2 fields in the Mainnode group, - New1 group - test feild and -test2 added from IP design mode > right click add field.
If I add any default expression value or rule or custom code it is not fired for test or for the test2 , i see in manifest.xsn it is defined as below
<xsf:domEventHandler match="/ConceptReviewDocument/MainNode/my:New1/my:test2">
<xsf:ruleSetAction ruleSet="ruleSet_288"></xsf:ruleSetAction>
</xsf:domEventHandler>.........
<xsf:ruleSet name="ruleSet_288">7645454321
<xsf:rule caption="Rule 1" isEnabled="yes">
<xsf:assignmentAction targetField="../my:test" expression=""test212""></xsf:assignmentAction>
</xsf:rule>
</xsf:ruleSet>
Please help me on this.
Thanks