Print Project Alternative for PeopleCode
Forum » Forum / General Discussion » Print Project Alternative for PeopleCode
Started by: PrajPraj
On: 1255563487|%e %b %Y, %H:%M %Z|agohover
Number of posts: 1
rss icon RSS: New posts
Print Project Alternative for PeopleCode
PrajPraj 1255563487|%e %b %Y, %H:%M %Z|agohover

A work colleague put me onto this great tip for modifying the XML in your exported project definition so that you can view PeopleCode in a better format.

A couple of catches:

  • Once you format the project XML it is no longer valid for re-import. So make a copy of it when doing this.
  • You need an additional file PeopleCodeViewer.xsl to exist in the same directory as your edited project XML. The source for this file is on the site, but doesn't work with a straight copy and paste so, here's a formatted version of it (note all credit goes to the original site for this code)
  • Simply open your edited project XML file in a browser to see the formatted results.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/root">
        <html>
            <header>
                <xsl:variable name="project" select="instance[@class='PJM']" />
                <h1>
                    Project:
                    <xsl:value-of select="$project/rowset/row/szProjectName" />
                </h1>
                <h3>
                    Description:
                    <xsl:value-of select="$project/rowset/row/szProjectDescr" />
                </h3>
            </header>
            <body>
                <xsl:for-each select="instance[@class='PCM']">
                    <table>
                        <tr>
                            <td>
                                <h5>
                                    <xsl:value-of select="rowset/row/szObjectValue_0" />:
                                    <xsl:value-of select="rowset/row/szObjectValue_1" />:
                                    <xsl:value-of select="rowset/row/szObjectValue_2" />:
                                    <xsl:value-of select="rowset/row/szObjectValue_3" />:
                                    <xsl:value-of select="rowset/row/szObjectValue_4" />
                                </h5>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <pre>
                                    <xsl:value-of select="peoplecode_text" />
                                </pre>
                            </td>
                        </tr>
                        </table>
            </xsl:for-each>
            </body>
            </html>
    </xsl:template>
</xsl:stylesheet>
Last edited on 1255563722|%e %b %Y, %H:%M %Z|agohover By Praj + Show more
Reply  |  Options
Unfold Print Project Alternative for PeopleCode by PrajPraj, 1255563487|%e %b %Y, %H:%M %Z|agohover
New Post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License