SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a CQWP with the Parameters:


and the following XSL:

  exclude-result-prefixes="x d xsl msxsl cmswrt"
  xmlns:xsl="" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
  <xsl:param name="ItemsHaveStreams">
    <xsl:value-of select="'False'" />
  <xsl:variable name="OnClickTargetAttribute" select="string(';_blank&quot;')" />
  <xsl:variable name="ImageWidth" />
  <xsl:variable name="ImageHeight" />
  <xsl:template name="Default" match="*" mode="itemstyle">
    <xsl:variable name="SafeLinkUrl">
      <xsl:call-template name="OuterTemplate.GetSafeLink">
        <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
    <xsl:variable name="SafeImageUrl">
      <xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
        <xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>

    <xsl:variable name="DisplayTitle">
      <xsl:call-template name="OuterTemplate.GetTitle">
        <xsl:with-param name="UrlColumnName" select="'Title'"/>

     <xsl:variable name="SafeImageHtml">
        <xsl:call-template name="OuterTemplate.GetColumnDataForUnescapedOutput">
           <xsl:with-param name="Name" select="'PublishingRollupImage'" /> 
           <xsl:with-param name="MustBeOfType" select="'Image'" />
           <xsl:with-param name="PublishingPageImage" select="'Image'" /> 

 <xsl:value-of disable-output-escaping="yes" select="$SafeImageHtml" />


As you can see, i tried getting SafeImageHtml but does not output anything. What could be the reason for that? (There are 3 Items in the list which is searched for, and all of them have their columns filled)

I tried something like this before:

<a href="{$SafeLinkUrl}">
<img src="{$SafeImageUrl}" title="{@ImageUrlAltText}"/>

But the Problem with that is that the link is formated on the RichText Field - so SafeLinkUrl gives me something like http://mysp/sites/Lists/Testlist/1_.000 here.

share|improve this question
In the variable SafeImageUrl - Why <xsl:with-param name="UrlColumnName" select="'ImageUrl'"/> and not <xsl:with-param name="UrlColumnName" select="'PublishingRollupImage'"/>? – banana Jul 1 '13 at 12:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.