This project is read-only.

Use the XSLT templates with CQWP in SP2010

Aug 24, 2011 at 7:06 PM

After successfully using the XSLT templates with DVWP, I have been trying to use them with the CQWP
but I am getting the following error
Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.Correlation ID:7b3b0e1f-5cc0-4962-9f22-52c3ab42aa04

Are the stylesheet blocks different for a DVWP and a CQWP?

Aug 24, 2011 at 7:11 PM

Note that adding that 'just' adding the <xsl:import       > tag in the ItemStyle.xsl is throwing the error.
The variable set up and xsl select beeing commented out

  <xsl:variable name="DisplaySize">
   <xsl:call-template name="FormatFileSize">
    <xsl:with-param name="FileSize" select="@FileSizeDisplay" />
<!--  File Size2: <xsl:value-of select="$DisplaySize" />-->

Aug 25, 2011 at 4:56 PM


I'm not sure what's going on. Have you tried adding your XSL inline in ItemStyle.xsl first? I find that it's always easiest to start that way and then move it out into a separate file once it's running.

Also keep in mind that the structure of the XSL in ItemStyle.xsl is a bit different than what you use in a DVWP. You'll want to mimic one of the existing styles if you are creating a new one.