Hi,
Here is the scenario:
1. While designing a form in infopath, I put controls on the form.
2. Then i delete some controls.
3. I publish the form.
4. Now when i extract the form .xsn file, both the schema (xsd file)
and the xml file contain the deleted controls as field.
So, what gives?? why are the deleted controls showing in the schema
and xml file??
But when i open the form file in infopath, it doesn't show the deleted
files. So how does infopath know that??
Is there anyway to get the deleted controls removed from the schema
and xml?
Here's the xsd:
Note that the form now has only 3 fields but as you can see all the
delted ones are being kept as well.
_________________________________________________________________________
<xsd:element name="myFields">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="my:field1" minOccurs="0"/>
<xsd:element ref="my:field2" minOccurs="0"/>
<xsd:element ref="my:field3" minOccurs="0"/>
<xsd:element ref="my:field4" minOccurs="0"/>
<xsd:element ref="my:field5" minOccurs="0"/>
<xsd:element ref="my:field6" minOccurs="0"/>
<xsd:element ref="my:field7" minOccurs="0"/>
</xsd:sequence>
<xsd:anyAttribute processContents="lax"
namespace="http://www.w3.org/XML/1998/namespace"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="field1" type="xsd:string"/>
<xsd:element name="field2" type="xsd:string"/>
<xsd:element name="field3" nillable="true" type="xsd:integer"/>
<xsd:element name="field4" nillable="true" type="xsd:boolean"/>
<xsd:element name="field5" type="xsd:string"/>
<xsd:element name="field6" type="xsd:string"/>
<xsd:element name="field7" type="xsd:string"/>
_________________________________________________________________________
Can anyone help me out here?
Thanks.
ps. I've got the latest Infopath patch but the older one also had this
behavior
Jerry Thomas [MSFT] - 21 Oct 2004 17:38 GMT
When you delete a control from a view, that does not remove the node that
you created. Switch the the Task Pane to the Data Source View and you will
see the nodes that exist whether they are used or not. To remove a node,
right click the node in the Data Source view and select Delete.

Signature
Jerry Thomas[MSFT]
<Jerryth@online.microsoft.com>
Microsoft Office InfoPath
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.
> Hi,
>
[quoted text clipped - 47 lines]
> ps. I've got the latest Infopath patch but the older one also had this
> behavior
Michelle - 21 Oct 2004 20:19 GMT
When you add controls to your form, fields get added to your Main Data
Source. Deleting the controls does not delete the field from your
Main Data Source. This is by design. Consider that you may want to
store values in your XML document without having controls on the form
for the user to interact with.
In order to delete the field from your Main Data Source open up the
DataSource in the taskpane, select the Main datasource from the list
of data sources and then right click on the field you want to delete
and choose delete from the popup context menu.
HTH.
Michelle
> Hi,
>
[quoted text clipped - 47 lines]
> ps. I've got the latest Infopath patch but the older one also had this
> behavior
M Ali - 22 Oct 2004 05:15 GMT
Thanks a lot, Michelle and Jerry.