2

I have created a VS 2008 WSP builder solution. IN that i have a custom field which has a XSL for list item view rendering using XSLT. This Solution does not render the image or hyperlink in SharePoint 2007, But does render in SP2010 with no issues. The XSL file is as below. Is there any issues with this...since its not rendering in SP2007.

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema"
            xmlns:d="http://schemas.microsoft.com/sharepoint/dsp"
            version="1.0"
            exclude-result-prefixes="xsl msxsl ddwrt"
            xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
            xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
            xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            xmlns:msxsl="urn:schemas-microsoft-com:xslt"
            xmlns:SharePoint="Microsoft.SharePoint.WebControls"
            xmlns:ddwrt2="urn:frontpage:internal"
            xmlns:user="urn::my-scripts">


  <xsl:template match="FieldRef[@FieldType = 'DocDisplay']" mode="Text_body">

    <xsl:param name="thisNode" select="." />

    <script type="text/javascript" src="_layouts/DocDisplay/DocDisplay.js"></script>
    <a href="#">
        <xsl:attribute name="onclick">

          var NewPopUp = SP.UI.$create_DialogOptions();

          NewPopUp.url = '/_layouts/*****/ABC.aspx;
          NewPopUp.title = 'View Doc';
          NewPopUp.width = 600;
          NewPopUp.height = 570;
          SP.UI.ModalDialog.showModalDialog(NewPopUp);
        </xsl:attribute>
        <img alt="link" src="/_layouts/DocStyle/Img/DisplayIcon.gif" style="border: none;"/>
      </a>

    <xsl:variable name="pdfId" select="$thisNode/@ID" />

    <a onclick="pdfDisplayInvoke('{$pdfId}')">Link</a>      
  </xsl:template >
</xsl:stylesheet>

Both hyperlinks [ (1)with image and (2) Link ] don't appear in SP2007

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.