“The formula contains one or more errors.
I got it when trying to add ,xsl as Data Connections to InfoPath then add new Rules to controls. Following this guide. It’s resolved the problem
DUPLICATE ATTRIBUTE ERROR:
This happens when a XSL file is added to the form as 2ndary data source. The namespace in the XSL conflicts what’s in Form’s ns.
Do not add XSL as 2ndary data source. Instead add it as form’s Resource File. Change your code that might be doing the XSLT transform to load the XSL manually. This fixes it as charm!
Work around code instead of havinf XSL as a secondary data source
WITH XSL AS SECONDARY DATA SOURCE, YOU COULD HAVE DONE SOMETHING LIKE THIS:
NOW SINCE THAT CAUSES NAMESPACE CONFUSION/CONFLICT, DO THE XSLT LIKE THIS:
It work for JScript. But C#, I don’t get the solution yet.