vgritsenko 02/02/04 17:46:45 Modified: src/documentation/xdocs/installing index.xml src/documentation/xdocs/userdocs/concepts matchers_selectors.xml mrustore.xml sitemap.xml storejanitor.xml src/documentation/xdocs/userdocs/generators jsp-generator.xml request-generator.xml xmldb-generator.xml xmldbcollection-generator.xml src/documentation/xdocs/userdocs/serializers pdf-serializer.xml src/documentation/xdocs/userdocs/xsp esql.xml sessions.xml Log: Fixing bug #6017: Documentation Frustration Revision Changes Path 1.7 +4 -2 xml-cocoon2/src/documentation/xdocs/installing/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/installing/index.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- index.xml 19 Jan 2002 21:19:37 -0000 1.6 +++ index.xml 5 Feb 2002 01:46:44 -0000 1.7 @@ -524,8 +524,10 @@ <strong># Change it to Xerces for C2</strong> JBOSS_CLASSPATH=$JBOSS_CLASSPATH:<strong>../lib/xerces-XXX.jar</strong> <strong># Remove the following two lines</strong> -<sub>JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.DocumentBuilderFactoryImpl -JAXP="$JAXP -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl"</sub> +JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=\ + org.apache.crimson.jaxp.DocumentBuilderFactoryImpl +JAXP="$JAXP -Djavax.xml.parsers.SAXParserFactory=\ + org.apache.crimson.jaxp.SAXParserFactoryImpl" [...] </source> <note>Windows users have to change <code>run.bat</code> accordingly. 1.2 +81 -81 xml-cocoon2/src/documentation/xdocs/userdocs/concepts/matchers_selectors.xml Index: matchers_selectors.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/concepts/matchers_selectors.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- matchers_selectors.xml 3 Jan 2002 12:31:04 -0000 1.1 +++ matchers_selectors.xml 5 Feb 2002 01:46:44 -0000 1.2 @@ -2,12 +2,12 @@ <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../../dtd/document-v10.dtd"> <document> <header> - <title>Using and Implementing Matchers and Selectors</title> - <version>0.1</version> - <type>Overview document</type> - <authors> - <person name="Christian Haul" email="[EMAIL PROTECTED]"/> - </authors> + <title>Using and Implementing Matchers and Selectors</title> + <version>0.1</version> + <type>Overview document</type> + <authors> + <person name="Christian Haul" email="[EMAIL PROTECTED]"/> + </authors> </header> <body> @@ -65,20 +65,20 @@ </p> <source><![CDATA[ - <map:match pattern="*/*/*/*/report.html"> - <map:generate type="serverpages" src="docs/getPostcodeData.xsp"> - <parameter name="postcode" value="{1}{2} {3}{4}"/> - </map:generate> - <map:transform src="stylesheets/html/report.xsl"/> - <map:serialize/> - </map:match> +<map:match pattern="*/*/*/*/report.html"> + <map:generate type="serverpages" src="docs/getPostcodeData.xsp"> + <parameter name="postcode" value="{1}{2} {3}{4}"/> + </map:generate> + <map:transform src="stylesheets/html/report.xsl"/> + <map:serialize/> +</map:match> ]]> </source> <p>On your XSP do</p> <source> <![CDATA[ - <xsp:expr>parameters.getParameter("postcode")</xsp:expr> +<xsp:expr>parameters.getParameter("postcode")</xsp:expr> ]]> </source> <p> @@ -113,15 +113,15 @@ <map:components> ... - <map:matchers default="wildcard"> + <map:matchers default="wildcard"> <map:matcher name="wildcard" - src="org.apache.cocoon.matching.WildcardURIMatcherFactory"/> + src="org.apache.cocoon.matching.WildcardURIMatcherFactory"/> ... <map:matcher name="next-page" - src="org.apache.cocoon.matching.WildcardParameterValueMatcherFactory"> + src="org.apache.cocoon.matching.WildcardParameterValueMatcherFactory"> <map:parameter name="parameter-name" value="next-state"/> </map:matcher> - </map:matchers> + </map:matchers> ... </map:components> @@ -151,11 +151,11 @@ <map:pipelines> <map:pipeline> - <map:match pattern="*"> - <map:generate type="serverpages" src="test/{1}.xsp"/> - <map:transform src="stylesheets/dynamic-page2html.xsl"/> - <map:serialize/> - </map:match> + <map:match pattern="*"> + <map:generate type="serverpages" src="test/{1}.xsp"/> + <map:transform src="stylesheets/dynamic-page2html.xsl"/> + <map:serialize/> + </map:match> </map:pipeline> </map:pipelines> @@ -167,18 +167,18 @@ </p> <source> <![CDATA[ - <map:match type="sessionstate" pattern="edit*"> - <!-- here you could insert parameters for the above matcher --> - <map:parameter name="attribute-name" value="__sessionstate"/> - <map:match type="next-page" pattern="ok*"> - <!-- do something here, eg. database updates --> - <map:call resource="simple-page1"/> - </map:match> - <map:match type="next-page" pattern="delete*"> - <!-- do something different here, eg. database deletions --> - <map:call resource="simple-page1"/> - </map:match> - </map:match> +<map:match type="sessionstate" pattern="edit*"> + <!-- here you could insert parameters for the above matcher --> + <map:parameter name="attribute-name" value="__sessionstate"/> + <map:match type="next-page" pattern="ok*"> + <!-- do something here, eg. database updates --> + <map:call resource="simple-page1"/> + </map:match> + <map:match type="next-page" pattern="delete*"> + <!-- do something different here, eg. database deletions --> + <map:call resource="simple-page1"/> + </map:match> +</map:match> ]]> </source> </s1> @@ -194,15 +194,15 @@ ... <map:selectors default="browser"> <map:selector name="browser" - src="org.apache.cocoon.selection.BrowserSelectorFactory"> + src="org.apache.cocoon.selection.BrowserSelectorFactory"> <browser name="explorer" useragent="MSIE"/> <browser name="lynx" useragent="Lynx"/> <browser name="netscape" useragent="Mozilla"/> </map:selector> <map:selector name="coded" - src="org.apache.cocoon.selection.CodedSelectorFactory"/> + src="org.apache.cocoon.selection.CodedSelectorFactory"/> <map:selector name="parameter" - src="org.apache.cocoon.selection.ParameterSelectorFactory"/> + src="org.apache.cocoon.selection.ParameterSelectorFactory"/> </map:selectors> ... @@ -219,37 +219,37 @@ <source> <![CDATA[ <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> - <map:components/> - <map:resources/> - <map:pipelines> - <map:pipeline> +<map:components/> +<map:resources/> +<map:pipelines> + <map:pipeline> + + <map:match pattern="*"> + <map:generate type="serverpages" src="test/{1}.xsp"/> + + <map:select type="browser"> + <!-- you could insert parameters here as well --> + <map:when test="explorer"> + <map:transform src="stylesheets/w3c-2-msie.xsl"/> + </map:when> + <map:when test="lynx"> + <map:transform src="stylesheets/dynamic-page2html-text.xsl"/> + <map:serialize/> + </map:when> + <map:when test="netscape"> + <map:transform src="stylesheets/ns4.xsl"/> + </map:when> + <map:otherwise> + <map:transform src="stylesheets/w3c.xsl"/> + </map:otherwise> + </map:select> - <map:match pattern="*"> - <map:generate type="serverpages" src="test/{1}.xsp"/> - - <map:select type="browser"> - <!-- you could insert parameters here as well --> - <map:when test="explorer"> - <map:transform src="stylesheets/w3c-2-msie.xsl"/> - </map:when> - <map:when test="lynx"> - <map:transform src="stylesheets/dynamic-page2html-text.xsl"/> - <map:serialize/> - </map:when> - <map:when test="netscape"> - <map:transform src="stylesheets/ns4.xsl"/> - </map:when> - <map:otherwise> - <map:transform src="stylesheets/w3c.xsl"/> - </map:otherwise> - </map:select> - - <map:transform src="stylesheets/dynamic-page2html.xsl"/> - <map:serialize/> - </map:match> + <map:transform src="stylesheets/dynamic-page2html.xsl"/> + <map:serialize/> + </map:match> - </map:pipeline> - </map:pipelines> + </map:pipeline> +</map:pipelines> </map:sitemap> ]]> </source> @@ -303,22 +303,22 @@ </p> <source> <![CDATA[ - private Map wildcardMatch (int [] pattern, Map objectModel, - Parameters parameters) { +private Map wildcardMatch (int [] pattern, Map objectModel, + Parameters parameters) { - // this has been generated by generateMethodSource -> - HashMap map = new HashMap(); - String uri = XSPRequestHelper.getSitemapURI(objectModel); - if (uri.startsWith("/")) - uri = uri.substring(1); - if (org.apache.cocoon.matching.helpers.WildcardURIMatcher.match ( - map, uri, pattern)) { - return map; - } else { - return null; - } - // <- this has been generated by generateMethodSource + // this has been generated by generateMethodSource -> + HashMap map = new HashMap(); + String uri = XSPRequestHelper.getSitemapURI(objectModel); + if (uri.startsWith("/")) + uri = uri.substring(1); + if (org.apache.cocoon.matching.helpers.WildcardURIMatcher.match ( + map, uri, pattern)) { + return map; + } else { + return null; } + // <- this has been generated by generateMethodSource +} ]]> </source> <p> 1.3 +6 -7 xml-cocoon2/src/documentation/xdocs/userdocs/concepts/mrustore.xml Index: mrustore.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/concepts/mrustore.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mrustore.xml 27 Jan 2002 23:37:13 -0000 1.2 +++ mrustore.xml 5 Feb 2002 01:46:44 -0000 1.3 @@ -57,13 +57,12 @@ </s2> </s1> <s1 title="Configuration of the MRUMemoryStore"> - <source> - <![CDATA[ - <store class="org.apache.cocoon.components.store.MRUMemoryStore" logger="core.store"> - <parameter name="maxobjects" value="100"/> - <parameter name="filesystem" value="true"/> - </store> - ]]> + <source><![CDATA[ +<store class="org.apache.cocoon.components.store.MRUMemoryStore" + logger="core.store"> + <parameter name="maxobjects" value="100"/> + <parameter name="filesystem" value="true"/> +</store>]]> </source> <p>Explanation of the paramters:</p> <ol> 1.2 +73 -51 xml-cocoon2/src/documentation/xdocs/userdocs/concepts/sitemap.xml Index: sitemap.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/concepts/sitemap.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sitemap.xml 3 Jan 2002 12:31:04 -0000 1.1 +++ sitemap.xml 5 Feb 2002 01:46:44 -0000 1.2 @@ -103,7 +103,8 @@ <![CDATA[ <?xml version="1.0"?> - <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> + <map:sitemap + xmlns:map="http://apache.org/cocoon/sitemap/1.0"> <map:components/> <map:views/> <map:resources/> @@ -117,7 +118,8 @@ <s2 title="The <map:sitemap>"> <source> <![CDATA[ - <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> + <map:sitemap + xmlns:map="http://apache.org/cocoon/sitemap/1.0"> ]]> </source> @@ -194,10 +196,12 @@ <source> <![CDATA[ <map:generators default="file"> - <map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/> - <map:generator name="dir" src="MyDirGenerator"/> + <map:generator name="file" + src="org.apache.cocoon.generation.FileGenerator"/> + <map:generator name="dir" + src="MyDirGenerator"/> <map:generator name="serverpages" - src="org.apache.cocoon.generation.ServerPagesGenerator"> + src="org.apache.cocoon.generation.ServerPagesGenerator"> ... </map:generator> </map:generators> @@ -219,12 +223,13 @@ <![CDATA[ <map:transformers default="xslt"> <map:transformer name="xslt" - src="org.apache.cocoon.transformation.TraxTransformer"> + src="org.apache.cocoon.transformation.TraxTransformer"> <use-request-parameters>false</use-request-parameters> - <use-browser-capabilities-db>false</use-browser-capabilities-db> + <use-browser-capabilities-db>false + </use-browser-capabilities-db> </map:transformer> <map:transformer name="xinclude" - src="org.apache.cocoon.transformation.XIncludeTransformer"/> + src="org.apache.cocoon.transformation.XIncludeTransformer"/> </map:transformers> ]]> </source> @@ -245,28 +250,33 @@ <![CDATA[ <map:serializers default="html"> <map:serializer name="html" mime-type="text/html" - src="org.apache.cocoon.serialization.HTMLSerializer"> - <doctype-public>-//W3C//DTD HTML 4.0 Transitional//EN</doctype-public> - <doctype-system>http://www.w3.org/TR/REC-html40/loose.dtd</doctype-system> + src="org.apache.cocoon.serialization.HTMLSerializer"> + <doctype-public>-//W3C//DTD HTML 4.0 Transitional//EN + </doctype-public> + <doctype-system>http://www.w3.org/TR/REC-html40/loose.dtd + </doctype-system> <omit-xml-declaration>true</omit-xml-declaration> <encoding>UTF-8</encoding> <indent>1</indent> </map:serializer> <map:serializer name="wap" mime-type="text/vnd.wap.wml" - src="org.apache.cocoon.serialization.XMLSerializer"> - <doctype-public>-//WAPFORUM//DTD WML 1.1//EN</doctype-public> - <doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml</doctype-system> + src="org.apache.cocoon.serialization.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 name="svg2jpeg" mime-type="image/jpeg" - src="org.apache.cocoon.serialization.SVGSerializer"> - <parameter name="background_color" type="color" value="#00FF00"/> + src="org.apache.cocoon.serialization.SVGSerializer"> + <parameter name="background_color" + type="color" value="#00FF00"/> </map:serializer> <map:serializer name="svg2png" mime-type="image/png" - src="org.apache.cocoon.serialization.SVGSerializer"> + src="org.apache.cocoon.serialization.SVGSerializer"> </map:serializer> </map:serializers> ]]> @@ -289,17 +299,17 @@ <![CDATA[ <map:selectors default="browser"> <map:selector name="load" - src="org.apache.cocoon.selection.MachineLoadSelector"> + src="org.apache.cocoon.selection.MachineLoadSelector"> ... </map:selector> <map:selector name="user" - src="org.apache.cocoon.selection.AuthenticationSelector"> + src="org.apache.cocoon.selection.AuthenticationSelector"> ... </map:selector> <map:selector name="browser" - src="org.apache.cocoon.selection.BrowserSelector"> + src="org.apache.cocoon.selection.BrowserSelector"> <browser name="explorer" useragent="MSIE"/> <browser name="lynx" useragent="Lynx"/> <browser name="mozilla5" useragent="Mozilla/5"/> @@ -326,12 +336,12 @@ <![CDATA[ <map:matchers default="wildcard"> <map:matcher name="wildcard" - src="org.apache.cocoon.matching.WildcardURIMatcher"> + src="org.apache.cocoon.matching.WildcardURIMatcher"> ... </map:matcher> <map:matcher name="regexp" - src="org.apache.cocoon.matching.RegexpURIMatcher"> + src="org.apache.cocoon.matching.RegexpURIMatcher"> ... </map:matcher> </map:matchers> @@ -357,13 +367,13 @@ <![CDATA[ <map:actions> <map:action name="add-employee" - src="org.apache.cocoon.acting.DatabaseAddAction"/> + src="org.apache.cocoon.acting.DatabaseAddAction"/> <map:action name="locale" - src="org.apache.cocoon.acting.LocaleAction"/> + src="org.apache.cocoon.acting.LocaleAction"/> <map:action name="request" - src="org.apache.cocoon.acting.RequestParamAction"/> + src="org.apache.cocoon.acting.RequestParamAction"/> <map:action name="form-validator" - src="org.apache.cocoon.acting.FormValidatorAction"/> + src="org.apache.cocoon.acting.FormValidatorAction"/> </map:actions> ]]> </source> @@ -785,7 +795,8 @@ <source> <![CDATA[ <map:match pattern="faq/*"> - <map:mount uri-prefix="faq" check-reload="no" src="faq/sitemap.xmap"/> + <map:mount uri-prefix="faq" check-reload="no" + src="faq/sitemap.xmap"/> </map:match> ]]> </source> @@ -846,13 +857,15 @@ <!-- Components =============================== --> <map:components> <map:matchers default="wildcard"> - <map:matcher name="wildcard" - src="org.apache.cocoon.matching.WildcardURIMatcher"/> + <map:matcher + name="wildcard" + src="org.apache.cocoon.matching.WildcardURIMatcher"/> </map:matchers> <map:selectors default="host"> - <map:selector name="host" - src="org.apache.cocoon.selection.HostSelector"> + <map:selector + name="host" + src="org.apache.cocoon.selection.HostSelector"> <host name="fee" value="www.foo.com"/> </map:selector> </map:selectors> @@ -945,7 +958,10 @@ <![CDATA[ public interface XMLProducer { - /** Set the <code>XMLConsumer</code> that will receive XML data. */ + /** + * Set the <code>XMLConsumer</code> that will + * receive XML data. + */ public void setConsumer(XMLConsumer consumer); } @@ -964,7 +980,8 @@ <source> <![CDATA[ -public interface XMLConsumer extends ContentHandler, LexicalHandler { +public interface XMLConsumer extends ContentHandler, + LexicalHandler { } ]]> @@ -1001,11 +1018,12 @@ public interface SitemapModelComponent extends Component { /** - * Set the <code>SourceResolver</code>, objectModel <code>Map</code>, - * the source and sitemap <code>Parameters</code> used to process the request. + * Set the <code>SourceResolver</code>, objectModel + * <code>Map</code>, the source and sitemap + * <code>Parameters</code> used to process the request. */ - void setup(SourceResolver resolver, Map objectModel, String src, - Parameters par) + void setup(SourceResolver resolver, Map objectModel, + String src, Parameters par) throws ProcessingException, SAXException, IOException; } ]]> @@ -1023,13 +1041,14 @@ public interface SitemapOutputComponent extends Component { /** - * Set the <code>OutputStream</code> where the requested resource should - * be serialized. + * Set the <code>OutputStream</code> where the requested + * resource should be serialized. */ void setOutputStream(OutputStream out) throws IOException; /** - * Get the mime-type of the output of this <code>Component</code>. + * Get the mime-type of the output of this + * <code>Component</code>. */ String getMimeType(); @@ -1049,7 +1068,8 @@ <source> <![CDATA[ -public interface Generator extends XMLProducer, SitemapModelComponent { +public interface Generator extends XMLProducer, + SitemapModelComponent { String ROLE = "org.apache.cocoon.generation.Generator"; @@ -1121,7 +1141,8 @@ * <parameter/> tags. * @return boolean Signals successfull test. */ - boolean select (String expression, Map objectModel, Parameters parameters); + boolean select (String expression, Map objectModel, + Parameters parameters); } ]]> </source> @@ -1143,9 +1164,9 @@ * Matches the pattern against some <code>Request</code> values * and returns a <code>Map</code> object with replacements * for wildcards contained in the pattern. - * @param pattern The pattern to match against. Depending on the - * implementation the pattern can contain wildcards - * or regular expressions. + * @param pattern The pattern to match against. Depending on + * the implementation the pattern can contain + * wildcards or regular expressions. * @param objectModel The <code>Map</code> with object of the * calling environment which can be used * to select values this matchers matches against. @@ -1192,14 +1213,15 @@ * @return Map The returned <code>Map</code> object with * sitemap substitution values which can be used * in subsequent elements attributes like src= - * using a xpath like expression: src="mydir/{myval}/foo" - * If the return value is null the processing inside - * the <map:act> element of the sitemap will - * be skipped. + * using a xpath like expression: + * src="mydir/{myval}/foo" + * If the return value is null the processing + * inside the <map:act> element of the sitemap + * will be skipped. * @exception Exception Indicates something is totally wrong */ - Map act(Redirector redirector, SourceResolver resolver, Map objectModel, - String source, Parameters par) + Map act(Redirector redirector, SourceResolver resolver, + Map objectModel, String source, Parameters par) throws Exception; } ]]> 1.3 +26 -27 xml-cocoon2/src/documentation/xdocs/userdocs/concepts/storejanitor.xml Index: storejanitor.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/concepts/storejanitor.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- storejanitor.xml 29 Jan 2002 20:02:07 -0000 1.2 +++ storejanitor.xml 5 Feb 2002 01:46:44 -0000 1.3 @@ -27,39 +27,38 @@ sleeps and waits for the next iteration.</p> </s1> <s1 title="Configuration"> - <source> - <![CDATA[ - <store-janitor class="org.apache.cocoon.components.store.StoreJanitorImpl" logger="root.store"> - <parameter name="freememory" value="1000000"/> - <parameter name="heapsize" value="60000000"/> - <parameter name="cleanupthreadinterval" value="10"/> - <parameter name="threadpriority" value="5"/> - <parameter name="percent_to_free" value="10"/> - </store-janitor> - ]]> - </source> + <source><![CDATA[ +<store-janitor + class="org.apache.cocoon.components.store.StoreJanitorImpl" + logger="root.store"> + <parameter name="freememory" value="1000000"/> + <parameter name="heapsize" value="60000000"/> + <parameter name="cleanupthreadinterval" value="10"/> + <parameter name="threadpriority" value="5"/> + <parameter name="percent_to_free" value="10"/> +</store-janitor> + ]]></source> <p>The right configuration is very important, because wrong settings can cause a high system load.</p> <s2 title="Example configuration"> <ul><li>Tomcat settings in tomcat.sh or tomcat.bat:</li></ul> - <source> - <![CDATA[ - %_RUNJAVA% %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" -Xms100000000 -Xmx200000000 org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9 - ]]> - </source> + <source><![CDATA[ +%_RUNJAVA% %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" -Xms100000000 \ + -Xmx200000000 org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9 + ]]></source> <ul><li>StoreJanitor settings:</li></ul> <p>The freememory and heapsize paramter always depends on the Xms and Xmx parameter.</p> - <source> - <![CDATA[ - <store-janitor class="org.apache.cocoon.components.store.StoreJanitorImpl" logger="root.store"> - <parameter name="freememory" value="50000000"/> - <parameter name="heapsize" value="150000000"/> - <parameter name="cleanupthreadinterval" value="10"/> - <parameter name="threadpriority" value="5"/> - <parameter name="percent_to_free" value="10"/> - </store-janitor> - ]]> - </source> + <source><![CDATA[ +<store-janitor + class="org.apache.cocoon.components.store.StoreJanitorImpl" + logger="root.store"> + <parameter name="freememory" value="50000000"/> + <parameter name="heapsize" value="150000000"/> + <parameter name="cleanupthreadinterval" value="10"/> + <parameter name="threadpriority" value="5"/> + <parameter name="percent_to_free" value="10"/> +</store-janitor> + ]]></source> <p>The <code>heapsize</code> _must_ be higher then the -Xms parameter and <code>freememory</code> _between_ those both. If you set the <code>heapsize</code> lower then the -Xms parameter and <code>freememory</code> very thin, then the cleanupthread will work all the time and cause a high system load. If you set the <code>heapsize</code> to close to the 1.2 +25 -31 xml-cocoon2/src/documentation/xdocs/userdocs/generators/jsp-generator.xml Index: jsp-generator.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/generators/jsp-generator.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jsp-generator.xml 3 Jan 2002 12:31:04 -0000 1.1 +++ jsp-generator.xml 5 Feb 2002 01:46:44 -0000 1.2 @@ -30,11 +30,9 @@ <li>Class: org.apache.cocoon.generation.JspGenerator</li> <li>Cacheable: ?.</li> </ul> -<source> - <![CDATA[ - <map:generate type="jsp"/> - ]]> -</source> +<source><![CDATA[ +<map:generate type="jsp"/> +]]></source> </s1> <s1 title="JSPEngine"> <p>As JSP servlet engines are implemented differently, you may have to @@ -47,26 +45,22 @@ If you want to use another JSPEngine component, you may specify it in a my.roles file. The following sample specify in file WEB-INF/my.roles a JSPEngine workging with WebLogicServer: </p> -<source> - <![CDATA[ +<source><![CDATA[ <?xml version="1.0"?> <role-list> <role name="org.apache.cocoon.components.jsp.JSPEngine" shorthand="jsp-engine" default-class="org.apache.cocoon.components.jsp.JSPEngineImplWLS"/> </role-list> - ]]> -</source> +]]></source> <p>Defining the file my.roles this way you must ensure that your cocoon.xconf refernces my.roles, like that: </p> -<source> - <![CDATA[ - ... - <cocoon version="2.0" user-roles="WEB-INF/my.roles"> - ... - ]]> -</source> +<source><![CDATA[ +... +<cocoon version="2.0" user-roles="WEB-INF/my.roles"> +... +]]></source> <p>Currently there are tree JSPEngine components available: </p> @@ -86,11 +80,11 @@ in cocoon.xconf, by modifying parameter name servlet-class to your needs. </p> <source><![CDATA[ - <jsp-engine> - <parameter name="servlet-class" value="my.servlet.MyJspServletOfMyServletEngine"/> - </jsp-engine> - ]]> -</source> +<jsp-engine> + <parameter name="servlet-class" + value="my.servlet.MyJspServletOfMyServletEngine"/> +</jsp-engine> +]]></source> <p>JSPEngineImpl instances directly the JSP servlet engine class, and services HttpRequest to this instance. </p> @@ -111,11 +105,11 @@ in cocoon.xconf, by modifying the parameter servlet-name. </p> <source><![CDATA[ - <jsp-engine> - <parameter name="servlet-name" value="MyNameOfMyJspServletOfMyServletEngine"/> - </jsp-engine> - ]]> -</source> +<jsp-engine> + <parameter name="servlet-name" + value="MyNameOfMyJspServletOfMyServletEngine"/> +</jsp-engine> +]]></source> </s2> <s2 title="JSPEngineImplNamedDispatcherInclude"> <p>This JSPEngine is implemented like JSPEnginImplWLS without using any WebLogic classes. @@ -128,11 +122,11 @@ in cocoon.xconf, by modifying the parameter servlet-name. </p> <source><![CDATA[ - <jsp-engine> - <parameter name="servlet-name" value="MyNameOfMyJspServletOfMyServletEngine"/> - </jsp-engine> - ]]> -</source> +<jsp-engine> + <parameter name="servlet-name" + value="MyNameOfMyJspServletOfMyServletEngine"/> +</jsp-engine> +]]></source> </s2> </s1> </body> 1.2 +15 -17 xml-cocoon2/src/documentation/xdocs/userdocs/generators/request-generator.xml Index: request-generator.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/generators/request-generator.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- request-generator.xml 3 Jan 2002 12:31:04 -0000 1.1 +++ request-generator.xml 5 Feb 2002 01:46:44 -0000 1.2 @@ -21,21 +21,18 @@ <li>Class: org.apache.cocoon.generation.RequestGenerator</li> <li>Cacheable: no.</li> </ul> -<source> - <![CDATA[ - <map:generate type="request"/> - <!-- The src attribute is optional --> - ]]> -</source> +<source><![CDATA[ +<map:generate type="request"/> +<!-- The src attribute is optional --> +]]></source> <p>The output has the following schema. All elements have the namespace <code>http://xml.apache.org/cocoon/requestgenerator/2.0</code></p> -<source> - <![CDATA[ +<source><![CDATA[ <?xml version="1.0" encoding="UTF-8"?> -<!-- The root element is request. The target attribute is the requested uri - and the source attribute is the optional source attribute of the sitemap - entry for this pipeline. --> +<!-- The root element is request. The target attribute is the + requested uri and the source attribute is the optional + source attribute of the sitemap entry for this pipeline. --> <request target="/cocoon/request" source="" xmlns="http://xml.apache.org/cocoon/requestgenerator/2.0"> @@ -43,11 +40,13 @@ <requestHeaders> <header name="accept-language">de</header> <header name="connection">Keep-Alive</header> - <header name="accept">image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*</header> + <header name="accept">image/gif, image/x-xbitmap, image/jpeg, + image/pjpeg, */*</header> <header name="host">thehost.serving.cocoon</header> <header name="accept-encoding">gzip, deflate</header> <header name="user-agent">Browser User Agent</header> - <header name="referer">http://thehost.serving.cocoon/cocoon/welcome</header> + <header name="referer">http://thehost.serving.cocoon/cocoon/welcome + </header> </requestHeaders> <!-- All request parameters: --> @@ -61,14 +60,13 @@ <!-- All configuration parameters: --> <configurationParameters> - <!-- Create a parameter element for each parameter specified in the pipeline - for this generator--> + <!-- Create a parameter element for each parameter specified + in the pipeline for this generator--> <parameter name="test_sitemap_parameter">the value</parameter> </configurationParameters> </request> -]]> -</source> +]]></source> </s1> </body> </document> 1.2 +5 -5 xml-cocoon2/src/documentation/xdocs/userdocs/generators/xmldb-generator.xml Index: xmldb-generator.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/generators/xmldb-generator.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- xmldb-generator.xml 3 Jan 2002 12:31:04 -0000 1.1 +++ xmldb-generator.xml 5 Feb 2002 01:46:44 -0000 1.2 @@ -34,14 +34,14 @@ configuration, based on the stock dbXML implementation, will look like this: </p> - <source> - <![CDATA[ -<map:generator name="xmldb" src="org.apache.cocoon.generation.XMLDBGenerator" label="content"> +<source><![CDATA[ +<map:generator name="xmldb" + src="org.apache.cocoon.generation.XMLDBGenerator" + label="content"> <driver>org.dbxml.client.xmldb.DatabaseImpl</driver> <base>xmldb:dbxml:///db/</base> </map:generator> - ]]> - </source> +]]></source> <p> Note that the content of the "base" tag will be prepended to the requested resource. It's important to keep a trailing slash at the 1.2 +5 -5 xml-cocoon2/src/documentation/xdocs/userdocs/generators/xmldbcollection-generator.xml Index: xmldbcollection-generator.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/generators/xmldbcollection-generator.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- xmldbcollection-generator.xml 3 Jan 2002 12:31:04 -0000 1.1 +++ xmldbcollection-generator.xml 5 Feb 2002 01:46:44 -0000 1.2 @@ -37,14 +37,14 @@ configuration, based on the stock dbXML implementation, will look like this: </p> - <source> - <![CDATA[ -<map:generator name="xmldbcollection" src="org.apache.cocoon.generation.XMLDBGenerator" label="content"> +<source><![CDATA[ +<map:generator name="xmldbcollection" + src="org.apache.cocoon.generation.XMLDBGenerator" + label="content"> <driver>org.dbxml.client.xmldb.DatabaseImpl</driver> <base>xmldb:dbxml:///db/</base> </map:generator> - ]]> - </source> +]]></source> <p> Note that the content of the "base" tag will be prepended to the requested resource. It's important to keep a trailing slash at the 1.2 +40 -20 xml-cocoon2/src/documentation/xdocs/userdocs/serializers/pdf-serializer.xml Index: pdf-serializer.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/serializers/pdf-serializer.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- pdf-serializer.xml 3 Jan 2002 12:31:05 -0000 1.1 +++ pdf-serializer.xml 5 Feb 2002 01:46:45 -0000 1.2 @@ -49,11 +49,15 @@ <p>The instruction to generate a font metric file is:</p> <p>Windows:</p> <source> - java -cp fop.jar;xerces.jar;xalan.jar;batik.jar org.apache.fop.fonts.apps.TTFReader %PATH_TO_FONT% %PATH_TO_METRICS_DIR%\%FONT_NAME%.xml +java -cp fop.jar;xerces.jar;xalan.jar;batik.jar \ + org.apache.fop.fonts.apps.TTFReader \ + %PATH_TO_FONT% %PATH_TO_METRICS_DIR%\%FONT_NAME%.xml </source> <p>Unix:</p> <source> - java -cp fop.jar:xerces.jar:xalan.jar:batik.jar org.apache.fop.fonts.apps.TTFReader $PATH_TO_FONT $PATH_TO_METRICS_DIR/$FONT_NAME.xml +java -cp fop.jar:xerces.jar:xalan.jar:batik.jar \ + org.apache.fop.fonts.apps.TTFReader \ + $PATH_TO_FONT $PATH_TO_METRICS_DIR/$FONT_NAME.xml </source> <p>For the sake of this tutorial, I'm going to be using windows, @@ -75,12 +79,20 @@ <source>$ mkdir d:\fop-fonts</source> <p>create the metrics for arial.ttf, arialb.ttf, arialbi.ttf, ariali.ttf</p> - <source> - $ java -cp fop.jar;xerces.jar;xalan.jar;batik.jar org.apache.fop.fonts.apps.TTFReader C:\WINNT\Fonts\arial.ttf D:\fop-fonts\arial.ttf.xml - $ java -cp fop.jar;xerces.jar;xalan.jar;batik.jar org.apache.fop.fonts.apps.TTFReader C:\WINNT\Fonts\arialb.ttf D:\fop-fonts\arialb.ttf.xml - $ java -cp fop.jar;xerces.jar;xalan.jar;batik.jar org.apache.fop.fonts.apps.TTFReader C:\WINNT\Fonts\arialbi.ttf D:\fop-fonts\arialbi.ttf.xml - $ java -cp fop.jar;xerces.jar;xalan.jar;batik.jar org.apache.fop.fonts.apps.TTFReader C:\WINNT\Fonts\ariali.ttf D:\fop-fonts\ariali.ttf.xml - </source> +<source> +$ java -cp fop.jar;xerces.jar;xalan.jar;batik.jar \ + org.apache.fop.fonts.apps.TTFReader \ + C:\WINNT\Fonts\arial.ttf D:\fop-fonts\arial.ttf.xml +$ java -cp fop.jar;xerces.jar;xalan.jar;batik.jar \ + org.apache.fop.fonts.apps.TTFReader \ + C:\WINNT\Fonts\arialb.ttf D:\fop-fonts\arialb.ttf.xml +$ java -cp fop.jar;xerces.jar;xalan.jar;batik.jar \ + org.apache.fop.fonts.apps.TTFReader \ + C:\WINNT\Fonts\arialbi.ttf D:\fop-fonts\arialbi.ttf.xml +$ java -cp fop.jar;xerces.jar;xalan.jar;batik.jar \ + org.apache.fop.fonts.apps.TTFReader \ + C:\WINNT\Fonts\ariali.ttf D:\fop-fonts\ariali.ttf.xml +</source> <p>If everything went to plan, you should now have the metrics for the Arial fonts in your fop-fonts directory.</p> </s3> @@ -93,28 +105,32 @@ <p>I also find it useful to retain the <code>.ttf</code> as it is also possible to add other types of fonts (if you want to read the FOP docs) and the ttf tells me where to locate the font.</p> - <source><![CDATA[ +<source><![CDATA[ <configuration> <fonts> - <font metrics-file="D:/fop-fonts/arial.ttf.xml" kerning="yes" embed-file="C:/WINNT/Fonts/arial.ttf"> + <font metrics-file="D:/fop-fonts/arial.ttf.xml" + kerning="yes" embed-file="C:/WINNT/Fonts/arial.ttf"> <font-triplet name="Arial" style="normal" weight="normal"/> <font-triplet name="ArialMT" style="normal" weight="normal"/> </font> - <font metrics-file="D:/fop-fonts/arialb.ttf.xml" kerning="yes" embed-file="C:/WINNT/Fonts/arialb.ttf"> + <font metrics-file="D:/fop-fonts/arialb.ttf.xml" + kerning="yes" embed-file="C:/WINNT/Fonts/arialb.ttf"> <font-triplet name="Arial" style="normal" weight="bold"/> <font-triplet name="ArialMT" style="normal" weight="bold"/> </font> - <font metrics-file="D:/fop-fonts/arialbi.ttf.xml" kerning="yes" embed-file="C:/WINNT/Fonts/arialbi.ttf"> + <font metrics-file="D:/fop-fonts/arialbi.ttf.xml" + kerning="yes" embed-file="C:/WINNT/Fonts/arialbi.ttf"> <font-triplet name="Arial" style="italic" weight="bold"/> <font-triplet name="ArialMT" style="italic" weight="bold"/> </font> - <font metrics-file="D:/fop-fonts/ariali.ttf.xml" kerning="yes" embed-file="C:/WINNT/Fonts/ariali.ttf"> + <font metrics-file="D:/fop-fonts/ariali.ttf.xml" + kerning="yes" embed-file="C:/WINNT/Fonts/ariali.ttf"> <font-triplet name="Arial" style="italic" weight="normal"/> <font-triplet name="ArialMT" style="italic" weight="normal"/> </font> </fonts> </configuration> - ]]></source> +]]></source> <p>There are other things you can add to this file, look at the FOP documentation for further information.</p> <p>If you are wondering why each font has been added twice it's to do @@ -129,15 +145,19 @@ <p>All that remains is to tell the serializer where your config file is located. Find the line in your sitemap which looks like:</p> - <source><![CDATA[ -<map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf"/> - ]]></source> +<source><![CDATA[ +<map:serializer name="fo2pdf" + src="org.apache.cocoon.serialization.FOPSerializer" + mime-type="application/pdf"/> +]]></source> <p>and replace it with...</p> - <source><![CDATA[ -<map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf"> +<source><![CDATA[ +<map:serializer name="fo2pdf" + src="org.apache.cocoon.serialization.FOPSerializer" + mime-type="application/pdf"> <user-config src="D:/fop-fonts/config.xml"/> </map:serializer> - ]]></source> +]]></source> </s2> <p>And that's it. Oh, one final thing to remember: the cache isn't aware of your config file. <strong>Always</strong> delete your cache-dir 1.3 +12 -12 xml-cocoon2/src/documentation/xdocs/userdocs/xsp/esql.xml Index: esql.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/xsp/esql.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- esql.xml 31 Jan 2002 16:11:33 -0000 1.2 +++ esql.xml 5 Feb 2002 01:46:45 -0000 1.3 @@ -171,18 +171,18 @@ <p>Example:</p> - <source> -<![CDATA[ - <esql:call>{? = foo(<esql:parameter direction="in" type="Int"><xsp:expr>1</xsp:expr></esql:parameter>)}</esql:call> - <esql:call-results> - <esql:results from-column="1" from-call="true"> - <esql:row-results> - <esql:get-string column="1"/> - </esql:row-results> - </esql:results> - </esql:call-results> -]]> - </source> +<source><![CDATA[ +<esql:call>{? = foo(<esql:parameter direction="in" + type="Int"><xsp:expr>1</xsp:expr></esql:parameter>)} +</esql:call> +<esql:call-results> + <esql:results from-column="1" from-call="true"> + <esql:row-results> + <esql:get-string column="1"/> + </esql:row-results> + </esql:results> +</esql:call-results> +]]></source> </s2> <p>The ultimate reference, is of course the source code, which is an XSLT logicsheet contained in the 1.2 +6 -3 xml-cocoon2/src/documentation/xdocs/userdocs/xsp/sessions.xml Index: sessions.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/xsp/sessions.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sessions.xml 3 Jan 2002 12:31:06 -0000 1.1 +++ sessions.xml 5 Feb 2002 01:46:45 -0000 1.2 @@ -206,7 +206,8 @@ "http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd"> <html><head><title> A Simple URI Session Example - </title></head><body vlink="blue" link="blue" alink="red" bgcolor="white"> + </title></head> + <body vlink="blue" link="blue" alink="red" bgcolor="white"> <h2 style="color: navy; text-align: center"> A Simple URI Session Example @@ -216,7 +217,8 @@ <p align="left"><i> <b xmlns:xsp-response="http://apache.org/xsp/response/2.0" - xmlns:xsp-request="http://apache.org/xsp/request/2.0">sessionpage.xsp</b> + xmlns:xsp-request="http://apache.org/xsp/request/2.0"> + sessionpage.xsp</b> </i></p> <p align="left"><i> @@ -226,7 +228,8 @@ <p align="left"><i> Encode URL Test = - <a href="sessionpage.xsp;jsessionid=F3E9575442D1899760A0B231D0042281">Follow me!</a> + <a href="sessionpage.xsp;jsessionid=F3E9575442D1899760A0B231D0042281"> + Follow me!</a> </i></p> </content>
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]