Dan Lewis' Development and Technology Blog

DVWP / DFWP properties cleared / “An error occurred processing the data view. The XslText property is empty.”

Posted by: djjlewis on: 04/11/2008

I was having a strange issue when adding a DataView / DataForm webpart into a webpart zone whereby it was being rendered correctly on the first page visit but then any page interactions including post-backs would cause all of the properties to be wiped. A symptom of this was the message above (“An error occurred processing the data view. The XslText property is empty.”) which was caused by both the XSL and XslLink properties being cleared, but was obviously not the root cause. The only other clue I was getting was an error about “An error occurred while parsing EntityName. Line X, Position Y”. This led me to believe it was a problem with the DataView transforming the XML via the XSL template.

After much investigation and comparing the erroneous webpart to a working one, I found that the issue is caused when you have a column / field in the DataFields element of the DataView with an ampersand (&) character – even though it is escaped properly e.g.

<property name=”DataFields” type=”string”>@ID,ID;@ContentType,Content Type; … @ThisAndThat, This &amp; That; … </property>

Changing the above line to :

<property name=”DataFields” type=”string”>@ID,ID;@ContentType,Content Type; … @ThisAndThat, This and That; … </property>

cured the problem. If you still want the ampersand displayed in the form, then you need to change it in the xsl directly. Obviously ampersands are not supported in the column display name of the datasources element, which seems amazing that I haven’t encountered this before.

3 Responses to "DVWP / DFWP properties cleared / “An error occurred processing the data view. The XslText property is empty.”"

Thank you. This was the same issue I encountered with a column name that included ampersand. I kept converting the view in SPD and everything worked well until I connected web parts using the SharePoint UI.

Thanks for sharing the fix. I was trying to fix the issue from 2 days. Thanks!!!

Matt

Thanks for finding that.. that’s a bummer really.. I need & as i have a long url string that is passing in querystrings.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.