floating attribute issue when previewing infopath form

T

Tanveer Rashid

I keep get the following error when attempting to preview an infopath form.
The form being developed has managed code (C#, VS 2005).

InfoPath cannot open the selected form because of an error in the form's code.
A floating attribute may not be passed as the context node for an XSLT
transform or an XPath query.

There is absolutely no custom code in the formcode.cs file. The schema that
i import into infopath after creating the project is fairly simple

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
xmlns="http://namespace" elementFormDefault="qualified"
targetNamespace="namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Root">
<xs:complexType>
<xs:sequence>
<xs:element name="Child1">
<xs:complexType />
</xs:element>
<xs:element name="Child2">
<xs:complexType />
</xs:element>
</xs:sequence>
<xs:anyAttribute namespace="http://www.w3.org/XML/1998/namespace"
processContents="lax" />
</xs:complexType>
</xs:element>
</xs:schema>

Can someone check if they face the same problem?
Save the xml schema given above in a file.
Create a new infopath project in VS2005 and then once the form is opened,
use Convert Main Data source to point to the schema above.
Once the schema has been imported, rebuild the project and preview the
infopath form.

I've posted on infopathdev.com as well. I've mentioned some more information
there.. http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=3369

Thank you
Tanveer Rashid
 
T

Tanveer Rashid

I've just verified that this issue did not occur on another machine.

The difference between the two machines? -

- The machine that it works on has only InfoPath 2003 SP1 installed +
infopath toolkit + VS 2005

- The machine that it does not work on (i.e. it gives the problem as
described above) has InfoPath 2007 beta installed in addition to the infopath
2003 SP2 installation + infopath toolkit + VS 2005

-Tanveer Rashid
 

Ask a Question

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

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

Ask a Question

Top