Dropdown and Sec Data Source make .xsl Invalid - InfoPath Dev
in

InfoPath Dev

Dropdown and Sec Data Source make .xsl Invalid

Last post 01-17-2006 12:53 PM by rbarnett. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 08-24-2005 07:54 AM

    Dropdown and Sec Data Source make .xsl Invalid

    I have run into a problem where I have lost several hours. Has anyone else run into this problem. Basically I have a couple dropdowns that connect to a web service to populate the dropdown. When I try to preview the form I get this saying that .xsl is invalid. After looking frantically for a solution I stumbled across this post below on google. I went in and removed the dropdowns, and the offending error went away. I have since found the exact offending dropdown, which also seems to be loosing its conditional formatting logic that was set for the control.

    Anyone have this issue before? Resolutions???

    "Yes, it is a bug. Sorry you ran into it, it's definitely something that we hope to fix in a future release. It occurs with certain dropdown list boxes that have conditional formatting and which get their values from a Secondary Data Source or the form's data source. "
    http://groups-beta.google.com/group/microsoft.public.infopath/browse_thread/thread/eb7527ebb1f0b1c6/58a65898e6bd1e99?lnk=st&q=infopath+.xsl+is+not+valid&rnum=6&hl=en#58a65898e6bd1e99
    Jason
    http://www.k2distillery.com/
  • 08-24-2005 11:03 AM In reply to

    Re: Dropdown and Sec Data Source make .xsl Invalid

    This may be the dom-event-handler problem. One of the worst bugs in SP1. We warned MS about this before SP1 was released and they thought they had fixed it, but unfortunately, it still repros. This only happens for .NET projects in Visual Studio. Workarounds ... well, there are situations where it occurs less frequently. If you always close VS after publishing your form, it happens less frequently. Also, don't preview from VS, but publish and test the form live. Last but not least, if you suspect a problem, extract the form files and windiff the manifest.xsf. The DOM event handler section is at the bottom. If it has been removed, add it back. Good luck!

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 08-24-2005 12:49 PM In reply to

    Re: Dropdown and Sec Data Source make .xsl Invalid

    Patrick, thanks for the tips. I noticed that I would lose the conditional formating when I publish the form. Also, I am NOT using .NET code (and cannot use it based on various client reasons). But the version of InfoPath I am using is SP1, so it seems to be a SP1 issue as a whole.

    Thanks for the prompt feedback.
    Jason
    http://www.k2distillery.com/
  • 12-02-2005 06:06 AM In reply to

    Re: Dropdown and Sec Data Source make .xsl Invalid

    Patrick,

    I had this error come back on me and I now know how to create the error. This is a bug in InfoPath. I decided to make another InfoPath form on the side and I was able to create the error the first time.

    To create this error.
    1 - Create a new blank
    2 - Add a secondary data source to the form. I used an existing webservice I had that returns data to be displayed in a dropdown. The webservice is only a "get" method.
    3 - Add a dropdown to the form.
    4 - Use the secondary data source to populate the dropdown.
    5 - Go to conditional formatting and add two conditions.
    5.1 - Add a condition that hides the control. The actual conditional logic itself does not matter. The expression can be something like >> my:field1 = "12123321321"
    5.2 - Add another conditional logic that disables the dropdown >> my:field1 = "dasyudsy7"
    6 - Go file >> save as >> and save the .xsn file.
    7 - Close InfoPath
    8 - Open your .xsn file again in design mode
    9 - Open up the conditional formatting for your dropdown

    Error - the conditional formatting is GONE.

    I had to implement a hack to get around this. Basically I place the dropdown in a section. I then apply the disable logic to the dropdown and then the hiding logic to the section. Obviously this does not make me happy because it compromises the integrity of my underlying schema to have a UI element inter-twined with my main XSD schema.

    I really wish there was a way to separate the two. I have a couple ideas, will post later.
    Jason
    http://www.k2distillery.com/
  • 12-05-2005 08:36 PM In reply to

    Re: Dropdown and Sec Data Source make .xsl Invalid

    I have sent this issue to Microsoft. Hopefully we'll hear back from them.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 12-06-2005 02:17 PM In reply to

    Re: Dropdown and Sec Data Source make .xsl Invalid

    FYI: Microsoft says this is fixed in SP2 which should be available on their website.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 12-06-2005 04:30 PM In reply to

    Re: Dropdown and Sec Data Source make .xsl Invalid

    Thanks...I appreciate. I will need to see if client will have it rolled out to thier large user base.
    Jason
    http://www.k2distillery.com/
  • 01-17-2006 12:53 PM In reply to

    Re: Dropdown and Sec Data Source make .xsl Invalid

    I recently encountered this problem and figured out some things before finding that SP2 fixes the problem. I thought I'd post what I found in case it's useful to someone.

    I don't know exactly what triggers the bug. The test case documented above matches my most recent case very closely, but I've had disappearing formatting for a while with only one condition too.

    When the bug is activated, the conditional formatting is sometimes completely stripped and other times it's replaced with this (in the view XLS file):
    <xsl:choose>
    <xsl:when test=""/>
    </xsl:choose>
    The latter case prevents the form from being opened or previewed since an empty test is invalid.

    The bug seems to occur during the loading of the form into design-mode. After opening a .xsn file in design-mode that still contained the conditional formatting (verified by examining the view XSL file), an inital preview showed the formatting to be active, but the properties of the dropdown showed no conditional formatting. After making an unrelated change to the form, preview failed with the XSL error. Further, afer applying SP2, the conditional formatting could be seen in the dropdown propeties in that same .xsn file.

    Once the conditional formatting has been stripped in design mode, publishing or saving the form makes the loss permanent.

    Since this is a design-mode bug, probably only developers need SP2 to avoid it. However, I don't know whether there are other changes in SP2 that require all users to upgrade though my initial tests indicate that SP1 can open a form saved with SP2.

    Since the bug occurs during loading into design-mode, a tedious workaround that doesn't require changing the schema or applying SP2 is to re-apply the conditions after making all other changes. The conditions should stay in place until the next time the form is opened in design-mode.

    Rodney
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.