File: profiler.xml

package info (click to toggle)
cocoon 1.8-1
  • links: PTS
  • area: contrib
  • in suites: woody
  • size: 12,016 kB
  • ctags: 3,793
  • sloc: xml: 16,682; java: 8,089; sh: 174; makefile: 61
file content (32 lines) | stat: -rw-r--r-- 863 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="profiler.xsl"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>

<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">

  <xsp:structure>
    <xsp:include>org.apache.cocoon.Profiler</xsp:include>
  </xsp:structure>

  <xsp:logic>

    private Profiler profiler;

    public void init (Director director) {
      super.init (director);
      profiler = (Profiler) director.getActor ("profiler");
    }
  </xsp:logic>

  <profile>
    <xsp:logic>
      if (profiler == null) {
        throw new RuntimeException
          ("Profiling has not been enabled in this instance of Apache Cocoon. \n" +
           "It can be enabled in the cocoon.properties file.");
      }
    </xsp:logic>
    <xsp:expr>profiler.getProfileTable (document)</xsp:expr>
  </profile>
</xsp:page>