0

XSLT code been used to showcase CSS content in SPS 2013 via OOTB - XML Webpart.

Tested my XSLT on w3school with the required XML file and output looks great. However, doesnt shows when placed in the webpart. It seems something that SharePoint doesnt accept as what would be in a normal HTML scenario.

Code belows seems fine and quite simple in nature.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
  <html>
  <body>
    <h2>My CD Collection</h2>
    <table border="1">
      <tr bgcolor="#9acd32">
      <th>Title</th>
      <th>Position No.</th>
      <th>Closing Date</th>
    </tr>
    <xsl:for-each select="items/item">
      <tr>
        <td><a href="{ArticleURL}" target="_new"><xsl:value-of select="Title"/></a></td>
        <td><xsl:value-of select="PositionNo"/></td>
        <td><xsl:value-of select="ClosingDate"/></td>
        </tr>
    </xsl:if>
    </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>

Has anyone came across such kind of an issue?

0

I got the solution, tested on SPS 2013 and SharePoint Online using the modified code and its working fine.

Code-

My CD Collection

Title Position No. Closing Date

Alternate if anyone is facing issues with this you can try the explanation from:

http://alstechtips.blogspot.com.au/2015/01/sharepoint-2013-how-to-display-rss-feed.html

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.