Sharepoint 2007 and XML Namespace Prefixes
I have run into an unusual problem with a solution that integrates
BizTalk 2006 R2 with Sharepoint 2007 and Infopath 2007. The basic idea
is that XML messages that are processed using BizTalk are sent to a
Sharepoint document forms library. From there the messages are edited
using Infopath, and then BizTalk picks them up again for final
processing. One of the neat things you can do with Infopath and
Sharepoint is to promote certain elements in an XML message that will
then show up as columns in the Sharepoint document library. These
promoted elements can then be used to create custom views and can be
sorted on among other things. The problem comes in because BizTalk uses
an XML namespace prefix of “ns:0”, and Infopath by default uses a prefix
of “ns:1”. Normally this is not a problem, but when you have a document
library that has been created from an Infopath template, it requires
that any XML messages sent to it have the same namespace prefix in order
for the promoted elements to show up in the Sharepoint document library
views.
I managed to get my solution working by creating using a custom XSLT
transform in my BizTalk map, but I would really like to find a proper
fix to this issue. If anybody knows how to make this work without using
a strange workaround, please leave a solution in the comments.