Document Information Panel does not load and errors out in Sharepoint 2007 and Word 2007

I would like to thank my Friend Bob who came up with this issue which led me in debugging and searching for the solution. So what was the Problem: The document Information Panel does not load at all and errors out with following error when used with Sharepoint 2007 (MOSS) document library:


Document Information Panel cannot create a new, blank form.
Document Information Panel cannot open the form. To fix this problem, contact your system administrator.
Form template:
Document Information Panel cannot open the following view: TestForWordIPanel Properties - Server
The following view file is not valid: view2.xsl
The .xsl file is not valid XSL.
Expected token ']' found 'NAME'.

count(p:properties/documentManagement/ns2:KetaanhMultiChoice/ns2:Value[. != 'Ketaanh'-->s<--' and . != 'Bob's' and . != 'Ketaanh']) != 0 or string-length(p:properties/documentManagement/ns2:KetaanhMultiChoice) + 2 * count(p:properties/documentManagement/ns2:KetaanhMultiChoice/ns2:Value) > 253



Well a little debugging revealed that there is no limitation on the number of elements or characters for the Values of a SITE COLUMN used in CONTENT TYPES. But this issue is seen even in case of just 2 values in a site-column, but the Columns had special values and they were:




So basically using apostrophe is causing that issue and not the number of characters. So the Solution or rather work-around is to use ASCII value (%27)for the values entered for site-column i.e.:




Following is the result:


So the conclusion is APOSTROPH is creating the trouble with MULTI CHOICE type of SITE COLUMNS and this could resolved using ASCII value for APOSTROPH which is %27.