| <?xml version="1.0" encoding="UTF-8"?> |
| <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../../dtd/document-v10.dtd"> |
| |
| <document> |
| <header> |
| <title>Status Generator</title> |
| <version>0.9</version> |
| <type>Technical document</type> |
| <authors> |
| <person name="Carsten Ziegeler" email="cziegeler@apache.org"/> |
| </authors> |
| <abstract>This document describes the status generator of Cocoon.</abstract> |
| </header> |
| <body> |
| <s1 title="Status Generator"> |
| <p>The status generator creates xml from the current status of cocoon.</p> |
| <p>The information is surrounded by the root element <code>statusinfo</code> |
| and grouped with the elements <code>group</code> and <code>value</code>.</p> |
| <p>The <code>statusinfo</code> element has the attributes <code>host</code> |
| and <code>date</code>.</p> |
| <p>A group collects several informations about one topic. The topic |
| is set by the attribute <code>name</code> of the group. A group |
| can have subgroups (element <code>group</code>) or values.</p> |
| <p>Each value has a name specified by the attribute <code>name</code> and can |
| consist of one or several <code>line</code>.</p> |
| <p>All elements have the namespace <code>http://apache.org/cocoon/status/2.0</code>.</p> |
| <ul> |
| <li>Name : status</li> |
| <li>Class: org.apache.cocoon.generation.StatusGenerator</li> |
| <li>Cacheable: no.</li> |
| </ul> |
| <source> |
| <![CDATA[ |
| <map:generate type="status"/> |
| ]]> |
| </source> |
| </s1> |
| <s1 title="DTD"> |
| <p>XML generated by status generator uses namespace |
| <code>http://apache.org/cocoon/status/2.0</code>. The DTD of XML |
| generated by status generator: |
| </p> |
| <source><![CDATA[ |
| <!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)+> |
| ]]></source> |
| </s1> |
| <s1 title="Example"> |
| <p>The current status generator outputs information about the jvm:</p> |
| <source> |
| <![CDATA[ |
| <?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> ]]> |
| </source> |
| </s1> |
| </body> |
| </document> |