locked
MOSS 2007 RSS Viewer's XSL Link not working RRS feed

  • Question

  • Has anybody been able to get the MOSS 2007 RSS Viewer Web Part to work
    with the XSL Link?

    I have an RSS feed file and a style sheet in the same anonymously
    accessible location. It works fine if I just point the web part at
    the RSS feed. If I try to use the XSL link, it fails every time with
    this error in the logs:

    RssWebPart: Exception handed to HandleXslException.HandleException
    System.ArgumentNullException: Value cannot be null. Parameter name: s
    at System.IO.StringReader..ctor(String s) at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXslCompiledTransform()
    at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform()

    I started by using the default XSL copied from "XSL Editor..." in the
    web part.

    It still doesn't work even when I use this for the XSL file:

    <?xml version="1.0" encoding="urf-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    FOO
    </xsl:template>
    </xsl:stylesheet>

    Tuesday, January 23, 2007 7:12 PM

Answers

  • unfortunately you raise more questions

    After looking at the site structure under our C:\Inetpub\wwwroot\wss\VirtualDirectories\IntranetTest80
    there is no structure for shared documents. only documents.

    Also, those 7 files you mention, I see them in the list under the style library/xsl style sheets, but they  do not exist as real files. when I click on them they are not found. is it possible the install process was not complete or items not installed?

      

     

    Wednesday, February 14, 2007 1:47 PM

All replies

  • Does the following work for you:

    1) Add an RSS Viewer and in the RSS Properties section set the RSS Feed URL to: http://rss.cnn.com/rss/cnn_topstories.rss

    2) In your Style Library (http://<YOUR SERVER>/Style Library/XSL Style Sheets/)

    Add a new file called myRSS.xsl and add:

    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
     <xsl:variable name="Rows" select="rss/channel/item"/>
        <xsl:variable name="RowCount" select="count($Rows)"/>
        <xsl:value-of select="rss/channel/title"/><br></br>
        <xsl:value-of select="$RowCount"/>
    </xsl:template>
    </xsl:stylesheet>

    Save and/or check in as needed.

    3) In your RSS Viewer set the Miscellaneous - XSL Link to: /Style Library/XSL Style Sheets/myRSS.xsl

    When I configure as above I get:

    CNN.com
    9

    • Proposed as answer by Clyde Menzi Monday, September 22, 2008 12:08 PM
    Monday, February 12, 2007 9:28 PM
  • couple of questions

    2) In your Style Library (http://<YOUR SERVER>/Style Library/XSL Style Sheets/)
    am I suppose to use the sharepoint interface to add an xsl file or do I manually create these folders and place an xsl file in it? I have tried both and nothing works.

    I receive the following error:
    An error occured applying the Xsl transform. Check the logs for details and correct the problem

     

     

    Tuesday, February 13, 2007 9:04 PM
  • That folder structure already exists (or it should if you are on a "Publishing" template)...if you put that URL in (modify your server name) and hit enter it should show a list of about 7 xsl files). You can also get there by doing "View all site content" | Style Library | XSL Style Sheets.

    If you don't have the above structure then you can just put the .xsl you create in a document library and point to it there.

    For example, on a team site. Create a .xsl in notepad (make sure to save it as .xsl and not .txt) add the lines from above and save it to the Shared Documents folder of your team site. Add the RSS web part to the team site and for the xsl link put:: http://portal/SiteDirectory/testsite/Shared%20Documents/myRSS.xls

    This gives me the same results.

    CNN.com
    9

    Wednesday, February 14, 2007 2:11 AM
  • unfortunately you raise more questions

    After looking at the site structure under our C:\Inetpub\wwwroot\wss\VirtualDirectories\IntranetTest80
    there is no structure for shared documents. only documents.

    Also, those 7 files you mention, I see them in the list under the style library/xsl style sheets, but they  do not exist as real files. when I click on them they are not found. is it possible the install process was not complete or items not installed?

      

     

    Wednesday, February 14, 2007 1:47 PM
  • It works fine if I put the XSL in the document library on the same site. What doesn't work is when the XSL file is hosted on a separate server.  Anybody had luck with that?
    Wednesday, February 14, 2007 2:28 PM
  • You won't see "Shared Documents" in the file structure. It is a default document library that gets created when you create a new "Team Site" using the SharePoint UI.

    Create a new site, and use the publishing template. (and you are using the Sharepoint 2007 released code right?). You will have a "View All Content" link at the top of the right hand menu. Look in there and see if you have the style library there.

     

    Wednesday, February 14, 2007 3:07 PM
  • A separate SharePoint server? Or just a file server?

    I've never tried putting in a UNC path in (like \\myserver\mystylesheets\myRSS.xsl...I'll try it and let you know what I get.

    Wednesday, February 14, 2007 3:09 PM
  • ok, getting a better idea of how things work...I am very new to moss2007.

    I have imported the xsl to the style sheet area AND have also added a shared document folder under documents and have located the rss.xsl file there too. neither works. the site was not created with the publishing template. it is a original site we created on our dev box.

    here is the error that appears in the rss web part

    "An unexpected error occured processing your request. Check the logs for details and correct the problem."
    Any idea what log it refers to? I have looked on the server event log, nothing there ref this issue.

    I have followed all your instructions to the T. any security issues I should be aware of? the feed does work in a browser..

    thanks...

     

    Wednesday, February 14, 2007 7:54 PM
  • Logs are here by default: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS

    You can configure a few things regarding logging in the central administration application (Operations | Logging and Reporting section | Diagnostic Logging). The defaults should be fine.
    http://<server>:<central admin port>/_admin/metrics.aspx

    While it is possible that security could cause a problem, as long as the user you are logged in as can look at the xsl file you are uploading then the RSS reader component will be able to see it as well.

    Make sure that the file is checked in and published (if needed). By default, a document library normally won't have publishing turned on so that shouldn't be a factor here. Are you putting the full URL to the .xsl file? Go to your document library, right click on the link to the .xsl file and "copy shortcut". Paste that into the "XSL Link" box when you configure the web part properties. If I put an invalid path there I get the message "An error occured applying the Xsl transform. Check the logs for details and correct the problem" And this is what I see in the log file: (search for WebParts and/or RssWebPart)

    02/14/2007 18:56:03.98  w3wp.exe (0x176C)                        0x1718 SharePoint Portal Server       WebParts                       8imi High     RssWebPart: Exception handed to HandleXslException.HandleException System.ArgumentNullException: Value cannot be null.  Parameter name: s     at System.IO.StringReader..ctor(String s)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXslCompiledTransform()     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform() 

     

     

    Thursday, February 15, 2007 1:58 AM
  • well it helps of the moss2007 admin person, remembers to setup the proxy setting right!!!!!!!!

     

    auuuuggghhhhhh.....

     

    thx

    Thursday, February 15, 2007 5:45 PM
  • Something like that, as long as in the web part you provide the link to the XSL with http://myserver... rather than \\myserver...

    At the moment I'm trying to see if it will work when I put the XSL file in:
    C:\Inetpub\wwwroot\wss\VirtualDirectories\80\mystylesheets

    I know that as opposed to WSSv2, there is no need to exclude the path, but for some reason even if I simply try to load a sample gif from that location, it gives me "access denied".
    http://myspserver/mystylesheets/sample.gif
    Friday, February 16, 2007 12:24 PM
  • This ( /Style Library/XSL Style Sheets/myRSS.xsl) only works for me if the RSS Viewer is on the root site.  If I use the same configuration with the RSS Viewer on the /sites/test, it gives the same error as before.  Can you try it?
    Friday, February 16, 2007 6:36 PM
  • Yes it still works for me if I reference the style sheet in the Style Library from a team site (make sure the style sheet has an extension that matches the url...it didn't work the first time I tried because I had given my file an .xls (instead of .xsl) extension by mistake). Also, make sure the file is checked in and/or published if you have that turned on.

    I also tried putting the xls file on the root web site of another server and I get the error. So evidently you can't have the xls file on another server. (I can browse to the file directly if I put it in the browser so it's not that it can't see it).

    Saturday, February 17, 2007 1:56 AM
  •  Is your server behind a web proxy, if that's the case, you need to modify your web.config.. which resides in IIS

    look for 

    <system.net>
        <defaultProxy>
          <proxy autoDetect="true" />
        </defaultProxy>
      </system.net>


    change it to:

    <system.net>
          <defaultProxy>
             <proxy usesystemdefault = "false" proxyaddress="
    <http://proxyservername:1234/> "
    bypassonlocal="true" />
          </defaultProxy>
       </system.net> 




    Please, with regards to MOSS if you have something you might want to share please do so, hope I hepled!
    Monday, September 22, 2008 12:08 PM