Hi all,

even though I'm not really up to date concerning the current
proceedings about Apache Cocoon 2, I just got around to prepare some
patches of some modifications I made to the docs and samples of
current Apache Cocoon 2.1 from CVS. If someone considers them
worthwhile, feel free to patch them into CVS.


===============
1. Welcome page
===============

The columns on the welcome page served by C2 are somewhat
"unbalanced", i.e. the left column is much shorter than the right
one. To improve that, my patch does not count the <group> elements but
the sample elements within to determine when to change to the second
column. 

Also, as we now have quite a lot of <group> elements, I have also
created a version of the patch that adds numbers to the group titles.

Index: webapp/stylesheets/simple-samples2html.xsl
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/webapp/stylesheets/simple-samples2html.xsl,v
retrieving revision 1.2
diff -u -r1.2 simple-samples2html.xsl
--- webapp/stylesheets/simple-samples2html.xsl	2001/06/01 17:22:39	1.2
+++ webapp/stylesheets/simple-samples2html.xsl	2001/09/25 15:38:48
@@ -27,16 +27,17 @@
  </xsl:template>
 
  <xsl:template match="samples">
-  <xsl:variable name="t-size" select="count(group)"/>
-  <xsl:variable name="half" select="round($t-size div 2)"/>
+  <xsl:variable name="all-samples" select="count(group/sample)"/>
+  <xsl:variable name="half-samples" select="round($all-samples div 2)"/>
     
   <table width="100%">
    <tr>
     <td valign="top">
      <xsl:for-each select="group">  
-      <xsl:variable name="here" select="position()"/>
+      <xsl:variable name="group-position" select="position()"/>
+      <xsl:variable name="current-sample" select="1 + count(../group[position() &lt;= $group-position]/sample)"/>
       <xsl:choose>
-       <xsl:when test="../group[$here&lt;=$half]">
+       <xsl:when test="$current-sample &lt;= $half-samples">
         <table bgcolor="#000000" border="0" cellspacing="2" cellpadding="2" width="97%" align="center">
          <tr>
           <td bgcolor="#0086b2" width="100%" align="left">
@@ -59,9 +60,10 @@
     </td>
     <td valign="top">
      <xsl:for-each select="group">  <!-- [position()<=$half] -->
-      <xsl:variable name="here" select="position()"/>
+      <xsl:variable name="group-position" select="position()"/>
+      <xsl:variable name="current-sample" select="1 + count(../group[position() &lt;= $group-position]/sample)"/>
       <xsl:choose>
-       <xsl:when test="../group[$here>$half]">
+       <xsl:when test="not($current-sample &lt;= $half-samples)">
         <table bgcolor="#000000" border="0" cellspacing="2" cellpadding="2" width="97%" align="center">
          <tr>
           <td bgcolor="#0086b2" width="100%" align="left">
Index: webapp/stylesheets/simple-samples2html.xsl
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/webapp/stylesheets/simple-samples2html.xsl,v
retrieving revision 1.2
diff -u -r1.2 simple-samples2html.xsl
--- webapp/stylesheets/simple-samples2html.xsl	2001/06/01 17:22:39	1.2
+++ webapp/stylesheets/simple-samples2html.xsl	2001/09/25 15:14:16
@@ -27,20 +27,21 @@
  </xsl:template>
 
  <xsl:template match="samples">
-  <xsl:variable name="t-size" select="count(group)"/>
-  <xsl:variable name="half" select="round($t-size div 2)"/>
+  <xsl:variable name="all-samples" select="count(group/sample)"/>
+  <xsl:variable name="half-samples" select="round($all-samples div 2)"/>
     
   <table width="100%">
    <tr>
     <td valign="top">
      <xsl:for-each select="group">  
-      <xsl:variable name="here" select="position()"/>
+      <xsl:variable name="group-position" select="position()"/>
+      <xsl:variable name="current-sample" select="1 + count(../group[position() &lt;= $group-position]/sample)"/>
       <xsl:choose>
-       <xsl:when test="../group[$here&lt;=$half]">
+       <xsl:when test="$current-sample &lt;= $half-samples">
         <table bgcolor="#000000" border="0" cellspacing="2" cellpadding="2" width="97%" align="center">
          <tr>
           <td bgcolor="#0086b2" width="100%" align="left">
-           <font size="+1" face="arial,helvetica,sanserif" color="#ffffff"><xsl:value-of select="@name"/></font>
+           <font size="+1" face="arial,helvetica,sanserif" color="#ffffff"><xsl:value-of select="$group-position"/>. <xsl:value-of select="@name"/></font>
           </td>
          </tr>
          <tr>
@@ -59,13 +60,14 @@
     </td>
     <td valign="top">
      <xsl:for-each select="group">  <!-- [position()<=$half] -->
-      <xsl:variable name="here" select="position()"/>
+      <xsl:variable name="group-position" select="position()"/>
+      <xsl:variable name="current-sample" select="1 + count(../group[position() &lt;= $group-position]/sample)"/>
       <xsl:choose>
-       <xsl:when test="../group[$here>$half]">
+       <xsl:when test="not($current-sample &lt;= $half-samples)">
         <table bgcolor="#000000" border="0" cellspacing="2" cellpadding="2" width="97%" align="center">
          <tr>
           <td bgcolor="#0086b2" width="100%" align="left">
-           <font size="+1" face="arial,helvetica,sanserif" color="#ffffff"><xsl:value-of select="@name"/></font>
+           <font size="+1" face="arial,helvetica,sanserif" color="#ffffff"><xsl:value-of select="$group-position"/>. <xsl:value-of select="@name"/></font>
           </td>
          </tr>
          <tr>


=======================
2. i18n improved German
=======================

I corrected the German words for the different languages.

Index: webapp/i18n/translations/messages_de.xml
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/webapp/i18n/translations/messages_de.xml,v
retrieving revision 1.1
diff -u -r1.1 messages_de.xml
--- webapp/i18n/translations/messages_de.xml	2001/07/19 11:22:22	1.1
+++ webapp/i18n/translations/messages_de.xml	2001/09/25 15:14:16
@@ -13,12 +13,12 @@
 	<message key="lang_id4">es</message>
 	<message key="lang_id5">hy</message>
 	<message key="language">Deutsch</message>
-	<message key="language1">Englische</message>
-	<message key="language2">Russe</message>
+	<message key="language1">Englisch</message>
+	<message key="language2">Russisch</message>
 	<message key="language3">Polnisch</message>
 	<message key="language4">Spanisch</message>
-	<message key="language5">Armenier</message>
-	<message key="titletext">Herzlich willkommen, Internationalisierung!</message>
+	<message key="language5">Armenisch</message>
+	<message key="titletext">Herzlich willkommen zur Internationalisierung!</message>
 	<message key="doclink">Näheres unter der i18n Dokumentation:</message>
 	<message key="first">Erstens</message>
 	<message key="second">Zweitens</message>


===========================================
3. "Improvements" to misc xdocs/*.xml files
===========================================

I added some missing words and reformulated some sentences for easier
comprehension. I also shortened some lines of file examples to allow
the page to fit into a browser window with less horizontall scrolling
required. 

Index: xdocs/caching.xml
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/xdocs/caching.xml,v
retrieving revision 1.10
diff -u -r1.10 caching.xml
--- xdocs/caching.xml	2001/07/28 03:13:53	1.10
+++ xdocs/caching.xml	2001/09/25 15:14:17
@@ -16,14 +16,14 @@
 	 </s1>
 	 <s1 title="Overview">
 		<p>The caching algorithm of @docname@ has a very flexible and powerful design.
-               The used algorithms and components are not hardcoded into the core of 
+               The algorithms and components used are not hardcoded into the core of 
                @docname@. They can be configured using Avalon components.</p>
-            <p>This document describes the available components for caching,
-               how they can be configured and how to implement own cacheable components.
+            <p>This document describes the components available for caching,
+               how they can be configured and how to implement your own cacheable components.
             </p>
 	 </s1>
 	 <s1 title="Caching of event pipelines">
-		<p>The algorithm used for caching depends on the configured event pipeline. 
+		<p>The algorithm used for caching depends on the event pipeline configured. 
                For more information about configuration see the chapter below.</p>
             <p>The following subchapters describe the available caching algorithms.</p>
 		<s2 title="The CachingEventPipeline">
@@ -72,7 +72,7 @@
                      the new validity objects in the cache.</p>
 			<s3 title="Examples">
 				<p>If you have the following pipeline:</p>
-                        <p>Generator[type=file|src=a.xml]->Transformer[type="xslt"|src=a.xsl]->Serializer</p>
+                        <p>Generator[type=file|src=a.xml] -> Transformer[type="xslt"|src=a.xsl] -> Serializer</p>
 				<p>The file generator is cacheable and generates a key which hashes the src 
          			   (or the filename) to build the key. The cache
                            validity object uses the last modification date of the xml file.</p>
@@ -85,7 +85,7 @@
                            If it is still valid, the cached content is directly feed into
                            the serializer.</p>
 				<p>Only part of the following pipeline is cached:</p>
-                        <p>Generator[type=file|src=a.xml]->Transformer[type="xslt"|src=a.xsl]->Transformer[type=sql]->Transformer[type="xslt"|src=b.xsl]->Serializer</p>
+                        <p>Generator[type=file|src=a.xml] -> Transformer[type="xslt"|src=a.xsl] -> Transformer[type=sql] -> Transformer[type="xslt"|src=b.xsl] -> Serializer</p>
 				<p>The file generator is cacheable and generates a key which hashes the src 
          			   (or the filename) to build the key. The cache
                            validity object uses the last modification date of the xml file.</p>
Index: xdocs/i18n-transformer.xml
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/xdocs/i18n-transformer.xml,v
retrieving revision 1.8
diff -u -r1.8 i18n-transformer.xml
--- xdocs/i18n-transformer.xml	2001/09/08 11:45:49	1.8
+++ xdocs/i18n-transformer.xml	2001/09/25 15:14:17
@@ -18,7 +18,7 @@
 	<body>
 		<s1 title="I18n Transformer">
 				<p>
-				Developing and maintaining multi-language sites is common problem for web developers.
+				Developing and maintaining multi-language sites is a common problem for web developers.
 				The usage of XML and XSL makes this task much more easier, especially with @docname@'s 
 				content, logic and presentation separation concept.
 				</p>
@@ -27,11 +27,11 @@
 				is based on a transformer - <link href="javadocs/org/apache/cocoon/transformation/I18nTransformer.html">
 						<code>I18nTransformer</code>
 					</link>
-				, it uses XML dictionaries for all the i18n data. The namespace of i18n is defined as follows:
+				, which uses XML dictionaries for all the i18n data. The namespace of i18n is defined as follows:
    				<code>xmlns:i18n="http://apache.org/cocoon/i18n/2.0";</code>
 				</p>
 				<p>
-				First implementation was developed by <link href="mailto:[EMAIL PROTECTED]";>Lassi Immonen</link>. In this implementation syntax was changed according to the <link href="http://www.infozone-group.org";>Infozone Group's</link> i18n proposal (with a little difference) and some new features were implemented.
+				The first implementation was developed by <link href="mailto:[EMAIL PROTECTED]";>Lassi Immonen</link>. In this implementation the syntax was changed according to the <link href="http://www.infozone-group.org";>Infozone Group</link>'s i18n proposal (with small changes) and some new features were implemented.
 				</p>
 				<p>
 				Enhancements for number, date and time have been contributed by <link href="mailto:[EMAIL PROTECTED]";>Michael Enke</link>.
@@ -44,7 +44,7 @@
 		</s1>
 			<s1 title="Features supported">
 				<p>
-					Following features are supported by the i18n transformer:
+					The following features are supported by the i18n transformer:
 				</p>
 				<ul>
 					<li>Text translation</li>
@@ -64,18 +64,18 @@
   <i18n:text>This text will be translated.</i18n:text>
 </para>]]></source>
 				<p>
-					Text inside the <code><![CDATA[<i18n:text>]]></code> will be used as a key to find the 
+					The text inside the <code><![CDATA[<i18n:text>]]></code> will be used as a key to find the 
 					translation in the dictionary. All attributes that are listed in the <code><![CDATA[<i18n:attr>]]></code> attribute also will be translated and their values will be used as dictionary keys.
 				</p>
 				<note>
 					This i18n approach was re-designed to implement i18n of dates, currencies, etc.
-					Although supported possibilities are quite enough for complicated formatting, but in some cases you will need to use XSP to achieve more flexibility.
+					Although the possibilities supported allow for complicated formatting, you will need to use XSP to achieve more flexibility in some cases.
 				</note>
 			</s1>
 		<s1 title="Markup content for translation">
 			<s2 title="Simple text translation">
 				<p>
-    			To translate simple text we use the <code><![CDATA[<i18n:text>]]></code> tag:
+    			To translate some simple text we use the <code><![CDATA[<i18n:text>]]></code> tag:
 			</p>
 				<source><![CDATA[
 <i18n:text>Text to be translated</i18n:text>]]></source>
@@ -85,9 +85,9 @@
 				<p>
 				The 'i18n:key' attribute can be used to specify a special key for
 			 	the dictionary. Normally, the text itself is used as the key to find
-			 	the translation in the dictionary. If we specify the attribute this
+			 	the translation in the dictionary. If we specify the 'i18n:key' attribute this
 			 	key is used to find the translation and the text itself is used as the default value, 
-				if translation not found.
+				if no translation can be found.
 		    </p>
 				<source><![CDATA[
 <i18n:text i18n:key="key_text">Default value</i18n:text>]]></source>
Index: xdocs/index.xml
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/xdocs/index.xml,v
retrieving revision 1.9
diff -u -r1.9 index.xml
--- xdocs/index.xml	2001/07/28 03:42:25	1.9
+++ xdocs/index.xml	2001/09/25 15:14:18
@@ -172,7 +172,7 @@
   is simply not practical.</p>
 
   <p>While in the HTML web model the page format and URL names
-  where the only necessary contracts between individuals to create a world wide
+  were the only necessary contracts between individuals to create a world wide
   web, in more structured information systems the number of contracts increases
   by a significant factor due to the need of coherence between the
   hosted information: common style, common design issues, common languages,
@@ -329,7 +329,7 @@
 cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic \
 checkout -r cocoon_20_branch xml-cocoon2
   </source>
-  <p><sub>(Windows users: Do not enter '\' symbol, continue typing on the same line.)</sub></p>
+  <p><sub>(Windows users: Do not enter the '\' symbol, continue typing on the same line.)</sub></p>
   <p>For more information on CVS access, refer to the CVS docs on this web site.</p>
   <note>To get the current version of @docname@ 2 you have to checkout the
         branch called cocoon_20_branch. The HEAD of the cvs repository is used
Index: xdocs/mrustore.xml
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/xdocs/mrustore.xml,v
retrieving revision 1.4
diff -u -r1.4 mrustore.xml
--- xdocs/mrustore.xml	2001/09/07 10:58:44	1.4
+++ xdocs/mrustore.xml	2001/09/25 15:14:18
@@ -16,10 +16,10 @@
   <s1 title="Overview">
     <p>The MRUMemoryStore was developed to provide a standard algorithm to
        store data in memory. For web-based applications the MRU (Most Recently Used) algorithm
-       is very suitable, because the most accessed object is always on "top".
+       is very suitable, because the object most frequently accessed is always on "top".
     </p>
-    <p> If configured the objects are also swaped to the filesystem, to hold them
-    in an persitent state over JVM restarts.
+    <p>If configured accordingly, the objects are also swapped to the filesystem, to hold them
+    in a persistent state over JVM restarts.
     </p>
   </s1>
   <s1 title="Implementation">
Index: xdocs/svg-serializer.xml
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/xdocs/svg-serializer.xml,v
retrieving revision 1.2
diff -u -r1.2 svg-serializer.xml
--- xdocs/svg-serializer.xml	2001/07/19 14:20:23	1.2
+++ xdocs/svg-serializer.xml	2001/09/25 15:14:18
@@ -47,8 +47,10 @@
 					<source><![CDATA[
 <map:serializers>
   <map:serializer>
-    <map:serializer name="svg2jpeg" mime-type="image/jpeg" src="org.apache.cocoon.serialization.SVGSerializer">
-      <parameter name="transcoder" value="org.apache.batik.transcoder.image.JPEGTranscoder"/>
+    <map:serializer name="svg2jpeg" mime-type="image/jpeg" 
+                    src="org.apache.cocoon.serialization.SVGSerializer">
+      <parameter name="transcoder" 
+                 value="org.apache.batik.transcoder.image.JPEGTranscoder"/>
   </map:serializer>
 <map:serializers>
 ...
@@ -75,8 +77,10 @@
 					<source><![CDATA[
 <map:serializers>
   <map:serializer>
-    <map:serializer name="svg2jpeg" mime-type="image/jpeg" src="org.apache.cocoon.serialization.SVGSerializer">
-      <parameter name="transcoder" value="org.apache.batik.transcoder.image.JPEGTranscoder"/>
+    <map:serializer name="svg2jpeg" mime-type="image/jpeg" 
+                    src="org.apache.cocoon.serialization.SVGSerializer">
+      <parameter name="transcoder" 
+                 value="org.apache.batik.transcoder.image.JPEGTranscoder"/>
       <parameter name="background_color" type="color" value="#00FF00"/>
   </map:serializer>
 <map:serializers>


OK, that's all from me for now. 

And keep up the great work with the "real" things. :-)

Gruß,

Uli

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to