| <!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"> |
| |
| <map:generate type="status"/> |
| |
| </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"> |
| <!ELEMENT statusinfo (group|value)*> |
| |
| <!ATTLIST statusinfo |
| date CDATA #IMPLIED |
| host CDATA #IMPLIED |
| > |
| |
| <!ELEMENT group (group|value)*> |
| <!ATTLIST group |
| name CDATA #IMPLIED |
| > |
| |
| <!ELEMENT value (line)+> |
| <!ATTLIST value |
| name CDATA #REQUIRED |
| |
| <!ELEMENT line (#PCDATA)+> |
| </pre> |
| |
| |
| <h1>Example</h1> |
| |
| <p>The current status generator outputs information about the jvm:</p> |
| |
| <pre class="code"> |
| |
| <?xml version="1.0" encoding="UTF-8"?> |
| <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"> |
| <group name="vm"> |
| <group name="memory"> |
| <value name="total"><line>11788288</line></value> |
| <value name="free"><line>2778208</line></value> |
| </group> |
| <group name="jre"> |
| <value name="version"><line>1.3.0</line></value> |
| <value type="simple" href="http://java.sun.com/" name="java-vendor"> |
| <line>Sun Microsystems Inc.</line> |
| </value> |
| </group> |
| <group name="operating-system"> |
| <value name="name"><line>Windows 2000</line></value> |
| <value name="architecture"><line>x86</line></value> |
| <value name="version"><line>5.0</line></value> |
| </group> |
| <value name="classpath"> |
| <line>classes</line> |
| <line>lib\ant.jar</line> |
| <line>lib\jasper.jar</line> |
| </value> |
| </group> |
| </statusinfo> |
| </pre> |
| |
| |
| </body> |
| </html> |