Wednesday, March 26, 2014

SPDisposeCheck xsl for viewing xml output

XML Structure we get after running SPDisposeCheck command line:






After applying XSL:




How to get this:



1. Save below code with name "SPDisposeChecker.xsl"

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <html>
  <body>
    <h2><a href="http://gadekarsatish.blogspot.com">SPDisposeCheck</a></h2>
    <table border="1">
      <tr bgcolor="#9acd32">
        <th>ID</th>
        <th>Module</th>
        <th>Method</th>
        <th>Assignment</th>
        <th>Line</th>
        <th>Notes</th>

      </tr>
      <xsl:for-each select="ArrayOfProblem/Problem">
        <tr>
          <td><xsl:value-of select="ID"/></td>
          <td><xsl:value-of select="Module"/></td>
          <td><xsl:value-of select="Method"/></td>
          <td><xsl:value-of select="Assignment"/></td>
          <td><xsl:value-of select="Line"/></td>
          <td><xsl:value-of select="Notes"/></td>
        </tr>
      </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>

</xsl:stylesheet>



2. Add below line in xml obtained from command line

<?xml-stylesheet type="text/xsl" href="SPDisposeChecker.xsl"?>

3. Save the xml and double click on it.



No comments:

Post a Comment

SharePoint document metadata not updating

I faced a weird issue today, Metadata for document which has lookup column was not updating even after saving the item. There was no erro...