You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by di...@apache.org on 2001/09/05 14:14:14 UTC
cvs commit: xml-cocoon2/xdocs profile-generator.xml directory-generator.xml docs-book.xml generators.xml site-book.xml status-generator.xml
dims 01/09/05 05:14:13
Modified: xdocs directory-generator.xml docs-book.xml
generators.xml site-book.xml status-generator.xml
Added: xdocs profile-generator.xml
Log:
Documentation Patches from "Bernhard Huber" <bh...@i-one.at>
Revision Changes Path
1.7 +78 -38 xml-cocoon2/xdocs/directory-generator.xml
Index: directory-generator.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/directory-generator.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- directory-generator.xml 2001/07/19 13:47:19 1.6
+++ directory-generator.xml 2001/09/05 12:14:13 1.7
@@ -14,45 +14,85 @@
<body>
<s1 title="Directory Generator">
<p>Generates an XML directory listing.</p>
- <p>
- The root node of the generated document will normally be a
- <code>directory</code> node, and a directory node can contain zero
- or more <code>file</code> or <code>directory</code> nodes. A file node has no
- children. Each node will contain the following attributes:</p>
- <ul>
- <li>name : the name of the file or directory</li>
- <li>lastModified : the time the file was last modified, measured as the number of
- milliseconds since the epoch (as in java.io.File.lastModified)</li>
- <li>date (optional) : the time the file was last modified in human-readable form</li>
- </ul>
- <p>All generated elements have the namespace
- <code>http://apache.org/cocoon/directory/2.0</code>. The root <code>directory</code>
- node has the attribute <code>requested</code> with the value <code>true</code>.</p>
- <ul>
- <li>Name : directory</li>
- <li>Class: org.apache.cocoon.generation.DirectoryGenerator</li>
- <li>Cacheable: no.</li>
- </ul>
-<source>
- <![CDATA[
+ <p>
+ The root node of the generated document will normally be a
+ <code>directory</code> node, and a directory node can contain zero
+ or more <code>file</code> or <code>directory</code> nodes. A file node has no
+ children. Each node will contain the following attributes:
+ </p>
+ <ul>
+ <li>name : the name of the file or directory</li>
+ <li>lastModified : the time the file was last modified, measured as the number of
+ milliseconds since the epoch (as in java.io.File.lastModified)</li>
+ <li>date (optional) : the time the file was last modified in human-readable form</li>
+ </ul>
+ <p>All generated elements have the namespace
+ <code>http://apache.org/cocoon/directory/2.0</code>.
+ The root <code>directory</code>
+ node has the attribute <code>requested</code> with the value <code>true</code>.
+ </p>
+ <ul>
+ <li>Name : directory</li>
+ <li>Class: org.apache.cocoon.generation.DirectoryGenerator</li>
+ <li>Cacheable: no.</li>
+ </ul>
+<source><![CDATA[
<map:generate type="directory" src="the_directory"/>
- ]]>
-</source>
+]]></source>
</s1>
-<s1 title="Configuration">
-<p>The following parameter can be specified in the pipeline for
- the generate command:</p>
-<ul>
-<li>depth (optional) : Sets how deep Directory Generator should delve into the
- directory structure. If set to 1 (the default), only the starting
- directory's immediate contents will be returned.</li>
-<li>dateFormat (optional) : Sets the format for the date attribute of each node, as
- described in java.text.SimpleDateFormat. If unset, the default
- format for the current locale will be used.</li>
-<li>root (optional) : The root pattern</li>
-<li>include (optional) : The include pattern</li>
-<li>exclude (optional) : The exclude pattern</li>
-</ul>
-</s1>
+ <s1 title="Configuration">
+ <p>The following parameter can be specified in the pipeline for
+ the generate command:
+ </p>
+ <ul>
+ <li>depth (optional) : Sets how deep Directory Generator should delve into the
+ directory structure. If set to 1 (the default), only the starting
+ directory's immediate contents will be returned.</li>
+ <li>dateFormat (optional) : Sets the format for the date attribute of each node, as
+ described in java.text.SimpleDateFormat. If unset, the default
+ format for the current locale will be used.</li>
+ <li>root (optional) : The root pattern</li>
+ <li>include (optional) : The include pattern</li>
+ <li>exclude (optional) : The exclude pattern</li>
+ </ul>
+ </s1>
+ <s1 title="DTD">
+ <p>XML generated by directory generator uses namespace
+ <code>http://apache.org/cocoon/status/2.0</code>. The DTD
+ of XML generated by directory generator:
+ </p>
+<source><![CDATA[
+ <!ELEMENT directory (directory|file)*>
+ <!ATTLIST directroy
+ name CDATA #REQUIRED
+ lastModified CDATA #REQUIRED
+ date CDATA #IMPLIED
+ requested CDATA #IMPLIED>
+
+ <!ELEMENt file #EMPTY>
+ <!ATTLIST file
+ name CDATA #REQUIRED
+ lastModified CDATA #REQUIRED
+ date CDATA #IMPLIED>
+]]></source>
+ </s1>
+ <s1 title="Example">
+ <p>
+ The current directory generator may generate following xml:
+ </p>
+<source><![CDATA[
+<directory xmlns="http://apache.org/cocoon/directory/2.0"
+ name="stylesheets" lastModified="999425490000"
+ date="02.09.01 12:11"
+ requested="true">
+ <directory name="sites"
+ lastModified="999425490000" date="02.09.01 12:11"/>
+ <file name="dynamic-page2html.xsl"
+ lastModified="999425490000" date="02.09.01 12:11"/>
+ <file name="simple-xml2html.xsl"
+ lastModified="999425490000" date="02.09.01 12:11"/>
+</directory>
+]]></source>
+ </s1>
</body>
</document>
1.26 +1 -0 xml-cocoon2/xdocs/docs-book.xml
Index: docs-book.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/docs-book.xml,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- docs-book.xml 2001/08/28 12:52:24 1.25
+++ docs-book.xml 2001/09/05 12:14:13 1.26
@@ -28,6 +28,7 @@
<hidden id="velocity-generator" label="Velocity Generator" source="velocity-generator.xml"/>
<hidden id="request-generator" label="Request Generator" source="request-generator.xml"/>
<hidden id="status-generator" label="Status Generator" source="status-generator.xml"/>
+ <hidden id="profile-generator" label="Profile Generator" source="profile-generator.xml"/>
<hidden id="stream-generator" label="Stream Generator" source="stream-generator.xml"/>
<hidden id="php-generator" label="Php Generator" source="php-generator.xml"/>
<hidden id="xmldb-generator" label="XML:DB Generator" source="xmldb-generator.xml"/>
1.9 +1 -0 xml-cocoon2/xdocs/generators.xml
Index: generators.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/generators.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- generators.xml 2001/08/23 12:54:58 1.8
+++ generators.xml 2001/09/05 12:14:13 1.9
@@ -35,6 +35,7 @@
<li><link href="velocity-generator.html">Velocity Generator</link></li>
<li><link href="request-generator.html">Request Generator</link></li>
<li><link href="status-generator.html">Status Generator</link></li>
+ <li><link href="profile-generator.html">Profile Generator</link></li>
<li><link href="stream-generator.html">Stream Generator</link></li>
<li><link href="php-generator.html">Php Generator</link> (optional)</li>
<li><link href="xmldb-generator.html">XML:DB Generator</link> (optional)</li>
1.28 +1 -0 xml-cocoon2/xdocs/site-book.xml
Index: site-book.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/site-book.xml,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- site-book.xml 2001/08/28 12:52:24 1.27
+++ site-book.xml 2001/09/05 12:14:13 1.28
@@ -31,6 +31,7 @@
<hidden id="velocity-generator" label="Velocity Generator" source="velocity-generator.xml"/>
<hidden id="request-generator" label="Request Generator" source="request-generator.xml"/>
<hidden id="status-generator" label="Status Generator" source="status-generator.xml"/>
+ <hidden id="profile-generator" label="Profile Generator" source="profile-generator.xml"/>
<hidden id="stream-generator" label="Stream Generator" source="stream-generator.xml"/>
<hidden id="php-generator" label="Php Generator" source="php-generator.xml"/>
<hidden id="xmldb-generator" label="XML:DB Generator" source="xmldb-generator.xml"/>
1.5 +25 -0 xml-cocoon2/xdocs/status-generator.xml
Index: status-generator.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/status-generator.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- status-generator.xml 2001/07/19 14:20:23 1.4
+++ status-generator.xml 2001/09/05 12:14:13 1.5
@@ -35,6 +35,31 @@
]]>
</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>
1.1 xml-cocoon2/xdocs/profile-generator.xml
Index: profile-generator.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE document SYSTEM "dtd/document-v10.dtd">
<document>
<header>
<title>Profile Generator</title>
<subtitle>in @doctitle@</subtitle>
<version>0.9</version>
<type>Technical document</type>
<authors>
<person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
</authors>
<abstract>This document describes the profile generator of
@docname@.</abstract>
</header>
<body>
<s1 title="Profile Generator">
<p>
The profile generator creates xml from the current profiler
measurement
results of cocoon.
</p>
<p>
The information is surrounded by the root element
<code>profilerinfo</code>
and grouped with the elements <code>pipeline</code>,
<code>average</code>, <code>result</code> and
<code>element</code>.
</p>
<p>
The <code>profilerinfo</code> element has the attribute
<code>date</code>.
The <code>pipeline</code> element has the attributes
<code>uri</code>, <code>count</code> and <code>time</code>.
The <code>average</code> element has the attribute
<code>time</code>.
The <code>element</code> element has the attributes
<code>role</code>, <code>source</code> and <code>time</code>.
</p>
<p>
A <code>pipeline</code> summarizes profile information of a
pipeline
as specified in the <code>sitemap</code>.
Each <code>pipeline</code> element consists of
an <code>average</code>, and a <code>result</code> element.
The <code>average</code> element describes the average time
values,
whereas the <code>result</code> element describes each pipeline
processing.
</p>
<p>
The <code>element</code> element describes the timing values
for each stage of
the pipeline processing.
</p>
<p>
All elements have the namespace
<code>http://apache.org/cocoon/profiler/1.0</code>.
</p>
<ul>
<li>Name : profile</li>
<li>Class:
org.apache.cocoon.components.profiler.ProfilerGenerator</li>
<li>Cacheable: no.</li>
</ul>
<s2 title="Configuraton of cocoon.xconf">
<p>Edit <code>cocoon.xconf</code>
</p>
<source><![CDATA[
...
<event-pipeline class="org.apache.cocoon.components.profiler.\
ProfilingNonCachingEventPipeline"/>
<sax-connector class="org.apache.cocoon.components.profiler.\
ProfilingSAXConnector"/>
...
<profiler/>
]]></source>
</s2>
<s2 title="Configuration sitemap.xmap">
<p>Edit <code>sitemap.xmap</code>
</p>
<source><![CDATA[
<map:generators default="file">
...
<map:generator name="profile"
src="org.apache.cocoon.components.profiler.ProfilerGenerator"
label="content"/>
</map:generators> ...
<map:match pattern="profile">
<map:generate type="profile"/>
<map:transform type="xslt" src="stylesheets/system/profile2html.xsl"/>
<map:serialize/>
</map:match>
]]></source>
</s2>
<p>
You may try <code>http://localhost/cocoon/profile</code>
several times.
</p>
</s1>
<s1 title="Configuration">
<p>The following parameter can be specified in the pipeline for
the generate command:
</p>
<ul>
<li>
sort (optional) : Sets how Profile Generator sorts
pipeline elements. You may set <code>sort</code> to
<code>uri</code>
to sort <code>pipeline</code> element by its <code>uri</code>
attribute,
setting <code>sort</code> to time sorts
<code>pipeline</code> elements by its <code>time</code>
attribute,
finally setting <code>sort</code> to count sorts
<code>pipeline</code> elements
by its <code>count</code> attribute.
</li>
</ul>
</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 profilerinfo (pipeline)*>
<!ATTLIST profilerinfo
date CDATA #IMPLIED
>
<!ELEMENT pipeline (average, result)*>
<!ATTLIST pipeline
uri CDATA #REQUIRED
count CDATA #REQUIRED
time CDATA #REQUIRED
>
<!ELEMENT average (element)*>
<!ATTLIST average
time CDATA #REQUIRED
>
<!ELEMENT result (element)*>
<!ATTLIST result
time CDATA #REQUIRED
>
<!ELEMENT element EMPTY>
<!ATTLIST element
role CDATA #REQUIRED
source CDATA #IMPLIED
time CDATA #REQUIRED
>
]]></source>
</s1>
<s1 title="Example">
<p>The profile generator may output information:
</p>
<source><![CDATA[
<profilerinfo xmlns="http://apache.org/cocoon/profiler/1.0"
date="01.09.2001 21:50:00">
<pipeline uri="welcome" count="1" time="481">
<average time="481">
<element role="file" source="docs/samples/samples.xml"
time="250"/>
<element role="xslt" source="stylesheets/simple-samples2html.xsl"
time="171"/>
<element role="org.apache.cocoon.serialization.HTMLSerializer"
time="60"/>
</average>
<result time="481">
<element role="file" source="docs/samples/samples.xml"
time="250"/>
<element role="xslt" source="stylesheets/simple-samples2html.xsl"
time="171"/>
<element role="org.apache.cocoon.serialization.HTMLSerializer"
time="60"/>
</result>
</pipeline>
<pipeline uri="profile" count="1" time="3355">
<average time="3355">
<element role="profile" time="2964"/>
<element role="xslt" source="stylesheets/system/profile2html.xsl"
time="180"/>
<element role="org.apache.cocoon.serialization.HTMLSerializer"
time="211"/>
</average>
<result time="3355">
<element role="profile" time="2964"/>
<element role="xslt" source="stylesheets/system/profile2html.xsl"
time="180"/>
<element role="org.apache.cocoon.serialization.HTMLSerializer"
time="211"/>
</result>
</pipeline>
</profilerinfo>
]]></source>
</s1>
</body>
</document>
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org