This is a weird one.
Going back to a SharePoint 2007 site formerly published with InfoPath 2007. Downloaded the form template and made some changes. When I went to re-publish I encountered an “unsupported expression” error.
The actual long message was as follows.
The following expression could not be parsed because of a syntax error or because it uses an undefined namespace prefix or unsupported function: pc:DisplayName
This appeared to have been coming from one of the people pickers (circa 2007 variety) but copying the Xpath on each of them yielded no easily identifiable pc:DisplayName.
I went back to the original template with no changes and it didn’t throw the same error during publishing.
I changed the Form type from Web Browser Form (InfoPath 2007) to InfoPath 2007 Filler Form and attempted publishing. The error went away.
So, I changed it back to Web Browser Form (InfoPath 2007) again…the way it originally was. The error stayed away and I published the form.
However, after publishing, the error came back. So I decided to look “under the covers.”
I saved the XSN as source files and looked within all the files. I was able to find where the pc: schema infiltrated my form template. Within view1.xsl I found the offending pc:DisplayName, and all the other related pc: references.
I’m not sure how this made its way into the form template, as I never specifically made this change, nor do I know how one would force this.
I did a simple “find and replace” on all the pc: occurrences with my: and saved and tested my work. All appears to be okay.
Sure would be nice to know how this happens!