Zac Mullett Engineering Services
Weblog

DataFormWebPart’s sensitivity to XSLT parameter tag placement

While customising the XSLT of a DataFormWebPart I found a discrepancy between design-time and run-time interpretation of a template tag implementing param and variable tags. Placing the <xsl:param> tags first is important.

In design-time it doesn’t so much matter where you place the <xsl:param> tag - SharePoint Designer will render the web part. At run-time, if <xsl:param> tags appear beneath <xsl:variable> tags then SharePoint delivers one of its characteristically unhelpful error messages (shown below). Of course, you try out what it suggests and everything is irritatingly fine in Designer.

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator.

Tags: , , ,

2 Responses to “DataFormWebPart’s sensitivity to XSLT parameter tag placement”

  1. Mark says:

    Thanks for the tip. Newbie question though. By “beneath” do you mean within an tag or literally beneath in the sense of an tag appearing after an tag in a page’s code?

  2. Zac Mullett says:

    Hi Mark,
    By beneath I mean ‘after’, and not ‘within’. xsl:param and xsl:variable are both children of the xsl:template tag.

Leave a Reply