blob: 771cc9c821e754f1e8d83b43646b54d5434da568 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Status Generator</title>
<link href="http://purl.org/DC/elements/1.0/" rel="schema.DC">
<meta content="Carsten Ziegeler" name="DC.Creator">
<meta content="This document describes the status generator of Cocoon." name="DC.Description">
</head>
<body>
<h1>Status Generator</h1>
<p>The status generator creates xml from the current status of cocoon.</p>
<p>The information is surrounded by the root element <span class="codefrag">statusinfo</span>
and grouped with the elements <span class="codefrag">group</span> and <span class="codefrag">value</span>.</p>
<p>The <span class="codefrag">statusinfo</span> element has the attributes <span class="codefrag">host</span>
and <span class="codefrag">date</span>.</p>
<p>A group collects several informations about one topic. The topic
is set by the attribute <span class="codefrag">name</span> of the group. A group
can have subgroups (element <span class="codefrag">group</span>) or values.</p>
<p>Each value has a name specified by the attribute <span class="codefrag">name</span> and can
consist of one or several <span class="codefrag">line</span>.</p>
<p>All elements have the namespace <span class="codefrag">http://apache.org/cocoon/status/2.0</span>.</p>
<ul>
<li>Name : status</li>
<li>Class: org.apache.cocoon.generation.StatusGenerator</li>
<li>Cacheable: no.</li>
</ul>
<pre class="code">
&lt;map:generate type="status"/&gt;
</pre>
<h1>DTD</h1>
<p>XML generated by status generator uses namespace
<span class="codefrag">http://apache.org/cocoon/status/2.0</span>. The DTD of XML
generated by status generator:
</p>
<pre class="code">
&lt;!ELEMENT statusinfo (group|value)*&gt;
&lt;!ATTLIST statusinfo
date CDATA #IMPLIED
host CDATA #IMPLIED
&gt;
&lt;!ELEMENT group (group|value)*&gt;
&lt;!ATTLIST group
name CDATA #IMPLIED
&gt;
&lt;!ELEMENT value (line)+&gt;
&lt;!ATTLIST value
name CDATA #REQUIRED
&lt;!ELEMENT line (#PCDATA)+&gt;
</pre>
<h1>Example</h1>
<p>The current status generator outputs information about the jvm:</p>
<pre class="code">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;statusinfo date="16.07.2001 16:46:20" host="myhost"
xmlns="http://apache.org/cocoon/status/2.0"
xmlns:xlink="http://www.w3.org/1999/xlink"&gt;
&lt;group name="vm"&gt;
&lt;group name="memory"&gt;
&lt;value name="total"&gt;&lt;line&gt;11788288&lt;/line&gt;&lt;/value&gt;
&lt;value name="free"&gt;&lt;line&gt;2778208&lt;/line&gt;&lt;/value&gt;
&lt;/group&gt;
&lt;group name="jre"&gt;
&lt;value name="version"&gt;&lt;line&gt;1.3.0&lt;/line&gt;&lt;/value&gt;
&lt;value type="simple" href="http://java.sun.com/" name="java-vendor"&gt;
&lt;line&gt;Sun Microsystems Inc.&lt;/line&gt;
&lt;/value&gt;
&lt;/group&gt;
&lt;group name="operating-system"&gt;
&lt;value name="name"&gt;&lt;line&gt;Windows 2000&lt;/line&gt;&lt;/value&gt;
&lt;value name="architecture"&gt;&lt;line&gt;x86&lt;/line&gt;&lt;/value&gt;
&lt;value name="version"&gt;&lt;line&gt;5.0&lt;/line&gt;&lt;/value&gt;
&lt;/group&gt;
&lt;value name="classpath"&gt;
&lt;line&gt;classes&lt;/line&gt;
&lt;line&gt;lib\ant.jar&lt;/line&gt;
&lt;line&gt;lib\jasper.jar&lt;/line&gt;
&lt;/value&gt;
&lt;/group&gt;
&lt;/statusinfo&gt;
</pre>
</body>
</html>