Index: WAeUP_SRP/trunk/profiles/default/workflows/definition.xsl
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows/definition.xsl	(revision 1415)
+++ WAeUP_SRP/trunk/profiles/default/workflows/definition.xsl	(revision 1415)
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="html"/>
+  <xsl:template match="/">
+    <html>
+      <head>
+        <title>
+          <xsl:for-each select="object">
+            <xsl:value-of select="@name"/>
+          </xsl:for-each>
+        </title>
+        <link rel="stylesheet" type="text/css" media="all"
+              href="../../xsl.css" />      
+      </head>
+      <body>
+        <table>
+          <xsl:for-each select="cps-workflow">
+            <tr>
+              <th>Title</th>
+              <td>
+                <xsl:value-of select="@title"/>
+              </td>
+            </tr>
+            <tr>
+              <th>Workflow Id</th>
+              <td>
+                <xsl:value-of select="@workflow_id"/>
+              </td>
+            </tr>
+            <tr>
+              <th>State Variable</th>
+              <td>
+                <xsl:value-of select="@state_variable"/>
+              </td>
+            </tr>
+            <tr>
+              <th>Meta Type</th>
+              <td>
+                <xsl:value-of select="@meta_type"/>
+              </td>
+            </tr>
+          </xsl:for-each>
+        </table>            
+        <h2>Managed Permissions</h2>
+        <table>
+          <xsl:for-each select="cps-workflow/permission">
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <tr style="background-color:{$color}">
+              <td colspan="">
+                <xsl:value-of select="text()"/>
+              </td>
+            </tr>
+          </xsl:for-each>
+        </table>
+        <h2>States</h2>
+          <xsl:for-each select="cps-workflow/state">
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+          <h3><xsl:value-of select="@state_id"/>  <xsl:value-of select="@title"/></h3>
+          <table>
+            <tr style="background-color:{$color}">
+              <th>
+                Exit Transitions
+              </th>
+              <td colspan="2">
+                <xsl:for-each select="exit-transition">
+                  <xsl:value-of select="@transition_id"/><br />
+                </xsl:for-each>
+              </td>
+            </tr>
+            <tr style="background-color:{$color}">
+              <th>
+                Permission Map
+              </th>
+              <th>
+                Acquired
+              </th>
+              <th>
+                Permission Roles
+              </th>
+            </tr>
+            <xsl:for-each select="permission-map">
+              <tr style="background-color:{$color}">
+                <td>
+                  <xsl:value-of select="@name"/>
+                </td>
+                <td>
+                  <xsl:value-of select="@acquired"/>
+                </td>
+                <td>
+                  <xsl:for-each select="permission-role">
+                    <xsl:value-of select="text()"/><br />
+                  </xsl:for-each>
+                </td>
+              </tr>
+            </xsl:for-each>
+          </table>
+        </xsl:for-each>
+        <h2>Transitions</h2>
+          <xsl:for-each select="cps-workflow/transition">
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+          <h3>Id: <xsl:value-of select="@transition_id"/> Title: <xsl:value-of select="@title"/></h3> 
+          <h3>New State: <xsl:value-of select="@new_state"/> Trigger: <xsl:value-of select="@trigger"/> </h3>
+          <table>
+            <xsl:for-each select="action">
+              <tr style="background-color:{$color}">
+                <td colspan="2">
+                  <strong>Action URL:</strong> <xsl:value-of select="@url"/>
+                </td>
+                <td colspan="1">
+                  <strong>Category:</strong> <xsl:value-of select="@category"/>
+                </td>
+                <td colspan="1">
+                  <strong>Box:</strong> <xsl:value-of select="text()"/>
+                </td>
+              </tr>
+            </xsl:for-each>
+            <tr style="background-color:{$color}">
+              <td colspan="2">
+                <strong>B Script:</strong> <xsl:value-of select="@before_script"/>
+              </td>
+              <td colspan="2">
+                <strong>A Script:</strong> <xsl:value-of select="@after_script"/>
+              </td>
+            </tr>
+            <tr style="background-color:{$color}">
+              <th colspan="2">
+                Transition Flags
+              </th>
+              <td colspan="2">
+                <xsl:for-each select="transition-behavior">
+                  <xsl:value-of select="@behavior_id"/><br />
+                </xsl:for-each>
+              </td>
+            </tr>
+            <tr style="background-color:{$color}">
+              <th>
+               Guard: Roles
+              </th>
+              <th>
+                Groups
+              </th>
+              <th>
+                Permissions
+              </th>
+              <th>
+                Expression
+              </th>
+            </tr>
+            <tr style="background-color:{$color}">
+              <td>
+                <xsl:for-each select="guard/guard-role">
+                  <xsl:value-of select="text()"/><br />
+                </xsl:for-each>
+              </td>
+              <td>
+                <xsl:for-each select="guard/guard-group">
+                  <xsl:value-of select="text()"/><br />
+                </xsl:for-each>
+              </td>
+              <td>
+                <xsl:for-each select="guard/guard-permission">
+                  <xsl:value-of select="text()"/><br />
+                </xsl:for-each>
+              </td>
+              <td>
+                <xsl:for-each select="guard/guard-expression">
+                  <xsl:value-of select="text()"/><br />
+                </xsl:for-each>
+              </td>
+            </tr>
+          </table>
+        </xsl:for-each>
+      </body>
+    </html>
+  </xsl:template>
+</xsl:stylesheet>
