Extrenal Xslt link breaking web parts

When you are using Xslt List View Web Parts there are cases where you might want to use an external Xslt style sheet (instead of hard-coding it in the web part itself.) In most cases this works fine but sometimes just after editing the web part you get an error message and the web part is broken.

This happens when you edit the web part in SharePoint Designer (i think it's random because there's no apparent reason why sometimes it happens and sometimes not.)
The web part breaks when SPD decides to break the lines of the <XslLink> tag. This tag has to be in one line without any line breaks.

This is how it has to be:
Xslt Link OK

And this is how SPD breaks it:
Xslt Link Broken

To fix this simply erase any line breaks and save the file.

Print Friendly and PDF

0 comments:

Post a Comment