giacomo 00/06/26 08:16:48
Modified: xdocs Tag: xml-cocoon2 sitemap.xml
Log:
Saving day work.
Revision Changes Path
No revision
No revision
1.1.2.2 +281 -13 xml-cocoon/xdocs/Attic/sitemap.xml
Index: sitemap.xml
===================================================================
RCS file: /home/cvs/xml-cocoon/xdocs/Attic/sitemap.xml,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- sitemap.xml 2000/06/26 12:28:03 1.1.2.1
+++ sitemap.xml 2000/06/26 15:16:44 1.1.2.2
@@ -136,7 +136,7 @@
<s3 title="Common Attributes of Components">
<p>
- All components have some common attributes. The list below will shows and explain
them:
+ All components have some common attributes. The list below will show and explain
them:
</p>
<dl>
@@ -144,8 +144,19 @@
<dd>The type attribute gives the component a reference which can be used to
point to them in the pipeline section.</dd>
<dt>src</dt>
<dd>Specifies where Cocoon finds the class representing this component. Note
that the content of
- the src attribute must be specified as an URI</dd>
+ the src attribute must be specified as an URI.
+ </dd>
</dl>
+
+ <p>
+ The following protocols can be specified for all URI aware attributes:
+ </p>
+ <ul>
+ <li>file:</li>
+ <li>class:</li>
+ <li>jar:</li>
+ <li>http:</li>
+ </ul>
</s3>
<s3 title="Component Parameters">
@@ -180,7 +191,7 @@
<s3 title="Generators">
<p>
- Generators generate XML content as SAX events and initialize the
+ A <jump anchor="interface-generator"><code>Generator</code></jump>
generates XML content as SAX events and initialize the
pipeline processing.
</p>
@@ -197,14 +208,15 @@
</source>
<p>
- The <code>default</code> attribute specifies the type of generator to
use if none is specified in a pipeline.
+ The <code>default</code> attribute on <code><map:generators></code>
specifies the type
+ of generator to use if none is specified in a pipeline.
</p>
</s3>
<s3 title="Filters">
<p>
- Filters transform SAX events in SAX events.
+ A <jump anchor="interface-filter"><code>Filter</code></jump>
transform SAX events in SAX events.
</p>
<source>
@@ -218,21 +230,24 @@
]]>
</source>
+
<p>
- The <code>default</code> attribute specifies the type of generator to
use if none is specified in a pipeline.
+ The <code>default</code> attribute on <code><map:filters></code>
specifies the type
+ of filter to use if none is specified in a pipeline.
</p>
</s3>
<s3 title="Serializers">
<p>
- Serializers transform SAX events in binary or char streams for
- final client consumption.
+ A <jump anchor="interface-serializer"><code>Serializers</code></jump>
transform SAX events
+ in binary or char streams for final client consumption.
</p>
<source>
<![CDATA[
<map:serializers default="html">
- <map:serializer type="html" mime-type="text/html" src="class:///org.apache.cocoon.serializer.HTMLSerializer">
+ <map:serializer type="html" mime-type="text/html"
+ src="class:///org.apache.cocoon.serializer.HTMLSerializer">
<doctype-public value="-//W3C//DTD HTML 4.0 Transitional//EN"/>
<doctype-system value="http://www.w3.org/TR/REC-html40/loose.dtd"/>
<preserve-space value="true"/>
@@ -241,18 +256,21 @@
<line-width value="120"/>
</map:serializer>
- <map:serializer type="wap" mime-type="text/vnd.wap.wml" src="class:///org.apache.cocoon.serializer.XMLSerializer">
+ <map:serializer type="wap" mime-type="text/vnd.wap.wml"
+ src="class:///org.apache.cocoon.serializer.XMLSerializer">
<doctype-public>-//WAPFORUM//DTD WML 1.1//EN</doctype-public>
<doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml</doctype-system>
<encoding>UTF-8</encoding>
</map:serializer>
- <map:serializer type="svg2jpg" mime-type="image/jpg" src="class:///org.apache.cocoon.serializer.SVGSerializer">
+ <map:serializer type="svg2jpg" mime-type="image/jpg"
+ src="class:///org.apache.cocoon.serializer.SVGSerializer">
<format value="jpg"/>
<compression-level>80%</compression-level>
</map:serializer>
- <map:serializer type="svg2png" mime-type="image/png" src="class:///org.apache.cocoon.serializer.SVGSerializer">
+ <map:serializer type="svg2png" mime-type="image/png"
+ src="class:///org.apache.cocoon.serializer.SVGSerializer">
<format>png</format>
<color-depth value="24"/>
</map:serializer>
@@ -261,9 +279,259 @@
</source>
<p>
- The <code>default</code> attribute specifies the type of generator to
use if none is specified in a pipeline.
+ The <code>default</code> attribute on <code><map:serializers></code>
specifies the type
+ of serializer to use if none is specified in a pipeline.
</p>
</s3>
+
+ <s3 title="Choosers">
+ <p>
+ A <jump anchor="interface-chooser"><code>Chooser</code></jump>
evaluate a boolean expression.
+ </p>
+ <source>
+ <![CDATA[
+ <map:choosers default="browser">
+ <map:chooser type="load" src="class:///org.apache.cocoon.chooser.MachineLoadChooser">
+ ...
+ </map:chooser>
+
+ <map:chooser type="user" src="class:///org.apache.cocoon.chooser.AuthenticationChooser">
+ ...
+ </map:chooser>
+
+ <map:chooser type="browser" factory="class:///org.apache.cocoon.matcher.BrowserChooserFactory">
+ ...
+ </map:chooser>
+ </map:choosers>
+ ]]>
+ </source>
+
+ <p>
+ The <code>default</code> attribute on <code><map:choosers></code>
specifies the type
+ of chooser to use if none is specified in a pipeline.
+ </p>
+
+ <p>
+ Because the sitemap will be translated and compiled into a java class at runtime
a
+ <jump anchor="interface-chooser"><code>Chooser</code></jump>
can specify a attribute <code>factory</code>
+ instead of a <code>src</code>. This <jump anchor="interface-chooser-factory"><code>ChooserFactory</code></jump>
+ class must be capable to return a java source code fragment that can be embedded
into a method corresponding
+ to the <jump anchor="interface-chooser"><code>Chooser</code></jump>s
evaluate method.
+ </p>
+ </s3>
+
+ <s3 title="Matchers">
+ <p>
+ A <jump anchor="interface-matcher"><code>Matcher</code></jump>
maps a pattern to a resource.
+ </p>
+ <source>
+ <![CDATA[
+ <map:matchers default="uri-wildcard">
+ <map:matcher type="uri-wildcard" factory="class:///org.apache.cocoon.matcher.WildcardURIMatcherFactory">
+ ...
+ </map:matcher>
+
+ <map:matcher type="uri-regexp" src="class:///org.apache.cocoon.matcher.RegexpURIMatcher">
+ ...
+ </map:matcher>
+ </map:matchers>
+ ]]>
+ </source>
+
+ <p>
+ The <code>default</code> attribute on <code><map:matchers></code>
specifies the type
+ of matcher to use if none is specified in a pipeline.
+ </p>
+
+ <p>
+ Because the sitemap will be translated and compiled into a java class at runtime
a
+ <jump anchor="interface-matcher"><code>Matcher</code></jump>
can specify a attribute <code>factory</code>
+ instead of a <code>src</code>. This <jump anchor="interface-matcher-factory"><code>MatcherFactory</code></jump>
+ class must be capable to return a java source code fragment that can be embedded
into a method corresponding
+ to the <jump anchor="interface-matcher"><code>Matcher</code></jump>s
match method.
+ </p>
+ </s3>
+ </s2>
+ </s1>
+
+ <s1 title="Interface specifications">
+ <anchor id="interface-XMLProducer"/>
+ <s2 title="XMLProduces">
+ <p>
+ This interfaces identifies classes that produce XML data, sending SAX
+ events to the configured <code>XMLConsumer</code> (or SAX
+ <code>ContentHandler</code> and <code>LexicalHandler</code>).<br/>
+ It's beyond the scope of this interface to specify a way in wich the XML
+ data production is started.
+ </p>
+
+ <source>
+ <![CDATA[
+ public interface XMLProducer {
+ /** Set the <code>XMLConsumer</code> that will receive XML data.
*/
+ public void setConsumer(XMLConsumer consumer);
+
+ /** Set the <code>ContentHandler</code> that will receive XML data.
*/
+ public void setContentHandler(ContentHandler content);
+
+ /** Set the <code>LexicalHandler</code> that will receive XML data.
*/
+ public void setLexicalHandler(LexicalHandler lexical);
+ }
+ ]]>
+ </source>
+ </s2>
+
+ <anchor id="interface-XMLConsumer"/>
+ <s2 title="XMLConsumer">
+ <p>
+ This interfaces identifies classes that consume XML data, receiving
+ notification of SAX events.<br/>
+ This interface unites the idea of SAX <code>ContentHandler</code> and
+ <code>LexicalHandler</code>.
+ </p>
+
+ <source>
+ <![CDATA[
+ public interface XMLConsumer extends ContentHandler, LexicalHandler {
+ }
+ ]]>
+ </source>
+ </s2>
+
+ <anchor id="interface-sitemap-component"/>
+ <s2 title="SitemapComponent">
+ <p>
+ Every component in the sitemap must implement the following interface:
+ </p>
+
+ <source>
+ <![CDATA[
+ public interface SitemapComponent extends Component {
+ /**
+ * Set the <code>Request</code>, <code>Response</code>
and sitemap
+ * <code>Parameters</code> used to process the request.
+ */
+ public void setup(Request req, Response res, String src, Parameters par)
+ throws ProcessingException, SAXException, IOException;
+ }
+ ]]>
+ </source>
+ </s2>
+
+ <anchor id="interface-generator"/>
+ <s2 title="Generator">
+ <p>
+ A <code>Generator</code> must implement at least the following interface:
+ </p>
+
+ <source>
+ <![CDATA[
+ public interface Generator extends XMLProducer, SitemapComponent {
+ public void generate()
+ throws IOException, SAXException, ProcessingException;
+ }
+ ]]>
+ </source>
+ </s2>
+
+ <anchor id="interface-filter"/>
+ <s2 title="Filter">
+ <p>
+ A <code>Filter</code> must implement at least the following interface:
+ </p>
+
+ <source>
+ <![CDATA[
+ public interface Filter extends XMLProducer, XMLConsumer, SitemapComponent {
+ }
+ ]]>
+ </source>
+ </s2>
+
+ <anchor id="interface-serializer"/>
+ <s2 title="Serializer">
+ <p>
+ A <code>Serializer</code> gets the <code>OutputStream</code>
where the XML should
+ be serialized with the following interface:
+ </p>
+
+ <source>
+ <![CDATA[
+ public interface Serializer extends XMLConsumer, SitemapComponent {
+
+ /**
+ * Set the <code>OutputStream</code> where the XML should be serialized.
+ */
+ public void setOutputStream(OutputStream out);
+ }
+ ]]>
+ </source>
+ </s2>
+
+ <anchor id="interface-chooser"/>
+ <s2 title="Chooser">
+ <p>
+ A <code>Chooser</code> gets a expression to evaluate and signals the evaluation
with a
+ boolean value.
+ </p>
+
+ <source>
+ <![CDATA[
+ public interface Chooser implements Component {
+ public boolean evaluate(...);
+ }
+ ]]>
+ </source>
+ </s2>
+
+ <anchor id="interface-chooser-factory"/>
+ <s2 title="ChooserFactory">
+ <p>
+ A <code>ChooserFactory</code> is capable to return the java source code
of the evaluate method of a
+ <jump anchor="interface-chooser"><code>Chooser</code></jump>
object. It gets the value of the test
+ attribute from the sitemap.
+ </p>
+
+ <source>
+ <![CDATA[
+ public interface ChooserFactory {
+ public String generateCode(String test);
+ }
+ ]]>
+ </source>
+ </s2>
+
+ <anchor id="interface-matcher"/>
+ <s2 title="Chooser">
+ <p>
+ A <code>Matcher</code> gets the <code>OutputStream</code>
where the XML should
+ be serialized with the following interface:
+ </p>
+
+ <source>
+ <![CDATA[
+ public interface Matcher implements Component {
+ public Map match(...);
+ }
+ ]]>
+ </source>
+ </s2>
+
+ <anchor id="interface-matcher-factory"/>
+ <s2 title="MatcherFactory">
+ <p>
+ A <code>MatcherFactory</code> is capable to return the java source code
of the match method of a
+ <jump anchor="interface-matcher"><code>Matcher</code></jump>
object. It gets the value of the pattern
+ attribute from the sitemap.
+ </p>
+
+ <source>
+ <![CDATA[
+ public interface MatcherFactory {
+ public String generateCode(String pattern);
+ }
+ ]]>
+ </source>
</s2>
</s1>
|