cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r646925 - in /cocoon/site/site/2.2/core-modules/core/2.2: 1016_1_1.html 873_1_1.html
Date Thu, 10 Apr 2008 19:02:19 GMT
Author: gkossakowski
Date: Thu Apr 10 12:02:17 2008
New Revision: 646925

URL: http://svn.apache.org/viewvc?rev=646925&view=rev
Log:
Publishing TraversableGenetars family docs.

Modified:
    cocoon/site/site/2.2/core-modules/core/2.2/1016_1_1.html
    cocoon/site/site/2.2/core-modules/core/2.2/873_1_1.html

Modified: cocoon/site/site/2.2/core-modules/core/2.2/1016_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/core-modules/core/2.2/1016_1_1.html?rev=646925&r1=646924&r2=646925&view=diff
==============================================================================
--- cocoon/site/site/2.2/core-modules/core/2.2/1016_1_1.html (original)
+++ cocoon/site/site/2.2/core-modules/core/2.2/1016_1_1.html Thu Apr 10 12:02:17 2008
@@ -1027,8 +1027,60 @@
               </ul>
     </li>
       </ul>
-         <div id="contentBody"><div id="bodyText"><h1 class="docTitle">TraversableGenerator</h1><h1>Summary</h1><p>No
summary available. The summary needs to be defined using the
-            <tt>@cocoon.sitemap.component.documentation</tt> annotation in the
Java source file for this component.</p><h1>Basic information</h1><table
class="bodyTable"><tr class="a"><th>Component type</th><td>Generator</td></tr><tr
class="b"><th>Cocoon block</th><td>core</td></tr><tr class="a"><th>Java
class</th><td>org.apache.cocoon.generation.TraversableGenerator</td></tr><tr
class="b"><th>Name in Sitemap</th><td></td></tr><tr class="a"><th>Cacheable</th><td>Yes</td></tr></table><h1>Documentation</h1><p>No
documentation available yet.</p></div><div class="editUrl"><div><em>Errors
and Improvements?</em> If you see any errors or potential improvements in this document
please help
+         <div id="contentBody"><div id="bodyText"><h1 class="docTitle">TraversableGenerator</h1><h1>Summary</h1><p>Generates
an XML source hierarchy listing from a Traversable Source.</p><h1>Basic information</h1><table
class="bodyTable"><tr class="a"><th>Component type</th><td>Generator</td></tr><tr
class="b"><th>Cocoon block</th><td>core</td></tr><tr class="a"><th>Java
class</th><td>org.apache.cocoon.generation.TraversableGenerator</td></tr><tr
class="b"><th>Name in Sitemap</th><td></td></tr><tr class="a"><th>Cacheable</th><td>Yes</td></tr></table><h1>Documentation</h1><p>The
root node of the generated document will normally be a collection node
+and a collection node can contain zero or more resource or collection nodes. A
+resource node has no children. Each node will contain the following attributes:
+</p><ul>
+<li><tt>name</tt> the name of the source</li>
+<li><tt>lastModified</tt> the time the source was last modified, measured
as the
+number of milliseconds since the epoch (as in java.io.File.lastModified)</li>
+<li><tt>size</tt> the source size, in bytes (as in java.io.File.length)</li>
+<li><tt>date</tt> (optional) the time the source was last modified in
+human-readable form</li>
+</ul><div class="note"><div><strong>Note: </strong>The TraversableGenerator
can browse block defined in the Servlet
+Service Framework in addition to the resources in the current block.</div></div><h3
xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0"><strong>Configuration
options:</strong></h3><ul>
+<li><tt><em>depth</em></tt> (optional) Sets how deep TraversableGenerator
should
+delve into the source hierarchy. If set to 1 (the default), only the starting
+collection's immediate contents will be returned. <em><br></br>
+</em></li>
+<li><tt><em>sort</em></tt> (optional) Sort order in which the
nodes are
+returned. Possible values are name, size, time, collection. collection is the
+same as name, except that the collection entries are listed first. System order
+is default. </li>
+<li><tt><em>reverse</em></tt> (optional) Reverse the order
of the sort </li>
+<li><tt><em>dateFormat</em></tt> (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> <tt><em>timeZone</em></tt> (optional) Sets the time zone
offset ID for the
+date attribute, as described in java.util.TimeZone. If unset, the default system
+time zone will be used. </li>
+<li><tt><em>refreshDelay</em></tt> (optional) Sets the delay
(in seconds)
+between checks on the source hierarchy for changed content. Defaults to 1
+second.</li>
+<li><tt><em>root</em></tt> (optional) Sets the the regular
expression for the
+root pattern. </li>
+<li><tt><em>include</em></tt> (optional) Sets the the regular
expression for
+including sources based on their names.</li>
+<li><em><tt><tt><em>exclude</em></tt></tt></em>
(optional) Sets the the regular
+expression for excluding sources based on their names.</li>
+</ul><h3 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0"><strong>Example:</strong></h3><pre>     
&lt;map:match pattern=&quot;pages.xml&quot;&gt;
+        &lt;map:generate type=&quot;traversable&quot; src=&quot;blockcontext:/&quot;&gt;
+          &lt;map:parameter name=&quot;depth&quot; value=&quot;4&quot;/&gt;
+          &lt;map:parameter name=&quot;include&quot; value=&quot;wsmain$|resource$|basepage$|\.(.+)&quot;/&gt;

+          &lt;map:parameter name=&quot;exclude&quot; value=&quot;xsl$|xmap$&quot;/&gt;
+        &lt;/map:generate&gt;
+        &lt;map:serialize type=&quot;xml&quot;/&gt;
+      &lt;/map:match&gt;</pre>The sitemap fragment above will browse every
block defined in the current
+block via the Servlet Service Framework (look at the &quot;blockcontext:/&quot;
+<tt>src</tt> attribute) and will include every resources fitting
+the&quot;<tt>wsmain/resource/basepage/*.</tt><tt>*</tt>&quot;
pattern (well,  its
+permutations too, like
+<tt>&quot;resource/</tt><tt>wsmain/resource/basepage/*.</tt><tt>*</tt>)
excluding
+those ending with &quot;<tt>xsl</tt>&quot; and &quot;<tt>xmap</tt>&quot;.While
the <tt>exclude</tt> could be referred to name of
+resources, the <tt>include</tt> should take into account its path as well, since
+the matching is done path segment by path segment. In other words, every single
+segment of the path leading to the resources to be included has to be matched.
+</div><div class="editUrl"><div><em>Errors and Improvements?</em>
If you see any errors or potential improvements in this document please help
         us: <a href="http://cocoon.zones.apache.org/daisy/cdocs/1016?branch=1&language=1">View,
Edit or comment</a> on the latest development version (registration required).
       </div></div></div>
     </div>

Modified: cocoon/site/site/2.2/core-modules/core/2.2/873_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/core-modules/core/2.2/873_1_1.html?rev=646925&r1=646924&r2=646925&view=diff
==============================================================================
--- cocoon/site/site/2.2/core-modules/core/2.2/873_1_1.html (original)
+++ cocoon/site/site/2.2/core-modules/core/2.2/873_1_1.html Thu Apr 10 12:02:17 2008
@@ -1027,8 +1027,66 @@
               </ul>
     </li>
       </ul>
-         <div id="contentBody"><div id="bodyText"><h1 class="docTitle">XPathTraversableGenerator</h1><h1>Summary</h1><p>No
summary available. The summary needs to be defined using the
-            <tt>@cocoon.sitemap.component.documentation</tt> annotation in the
Java source file for this component.</p><h1>Basic information</h1><table
class="bodyTable"><tr class="a"><th>Component type</th><td>Generator</td></tr><tr
class="b"><th>Cocoon block</th><td>core</td></tr><tr class="a"><th>Java
class</th><td>org.apache.cocoon.generation.XPathTraversableGenerator</td></tr><tr
class="b"><th>Name in Sitemap</th><td></td></tr><tr class="a"><th>Cacheable</th><td>Yes</td></tr></table><h1>Documentation</h1><p>No
documentation available yet.</p></div><div class="editUrl"><div><em>Errors
and Improvements?</em> If you see any errors or potential improvements in this document
please help
+         <div id="contentBody"><div id="bodyText"><h1 class="docTitle">XPathTraversableGenerator</h1><h1>Summary</h1><p>Generates
an XML collection listing performing XPath queries on XML sources.
+It can be used both as a plain TraversableGenerator or, if an XPath is
+specified, it will perform an XPath query on every XML resource.</p><h1>Basic
information</h1><table class="bodyTable"><tr class="a"><th>Component
type</th><td>Generator</td></tr><tr class="b"><th>Cocoon
block</th><td>core</td></tr><tr class="a"><th>Java class</th><td>org.apache.cocoon.generation.XPathTraversableGenerator</td></tr><tr
class="b"><th>Name in Sitemap</th><td></td></tr><tr class="a"><th>Cacheable</th><td>Yes</td></tr></table><h1>Documentation</h1><p>It
will perform an XPath query on every XML resource, where &quot;xml resource&quot;
+is, by default, any resource ending with &quot;.xml&quot;, which can be overriden
by
+setting the (regexp) pattern <tt>xmlFiles</tt> (this has the effect of
+increasing, not limiting, the scope of the search) as a sitemap parameter, or
+where the name of the resource has a container-wide mime-type mapping to
+'text/xml' such as specified by mime-mapping elements in a web.xml descriptor
+file. The XPath can be specified in two ways:</p><ol type="1">
+<li>By using an XPointerish syntax in the URL: everything following the pound
+sign (possiby preceding query string arguments) will be treated as the XPath;
+</li>
+<li>Specifying it as a sitemap parameter named &quot;xpath&quot;</li>
+</ol><div class="note"><div><strong>Note: </strong>Since XPathTraversableGemerator
is a subclass of
+TraversableGenerator,  it uses the same set of parameters ( adding some of its
+own though). Please reer to the TraversableGenerator documentation for an
+explanation on the use of <tt xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">depth</tt>,
<tt xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">exclude</tt>,
<tt xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">include</tt>,
+etc. parameters.</div></div><h3 xmlns:p="http://outerx.org/daisy/1.0#publisher"
xmlns:ns="http://outerx.org/daisy/1.0"><strong> Sample usage:</strong></h3><pre><strong
xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Sitemap:</strong>
+&lt;map:match pattern=&quot;documents/**&quot;&gt;
+	&lt;map:generate type=&quot;xpathtraversable&quot; src=&quot;docs/{1}#/article/title|/article/abstract&quot;
&gt;
+     		&lt;map:parameter name=&quot;xmlFiles&quot; value=&quot;\.xml$&quot;/&gt;
+	&lt;/map:generate&gt;
+	&lt;map:serialize type=&quot;xml&quot;/&gt; 
+&lt;/map:match&gt;
+
+<strong xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Request:</strong>
+   http://www.some.host/documents/test
+
+<strong xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Result:</strong>
+ &lt;collection:collection
+   name=&quot;test&quot; lastModified=&quot;1010400942000&quot;
+   date=&quot;1/7/02 11:55 AM&quot; requested=&quot;true&quot;
+   xmlns:collection=&quot;http://apache.org/cocoon/collection/1.0&quot;&gt;
+   &lt;collection:collection name=&quot;subdirectory&quot; lastModified=&quot;1010400942000&quot;
date=&quot;1/7/02 11:55 AM&quot; /&gt;
+   &lt;collection:resource name=&quot;test.xml&quot; lastModified=&quot;1011011579000&quot;
date=&quot;1/14/02 1:32 PM&quot;&gt;
+     &lt;collection:xpath docid=&quot;test.xml&quot; query=&quot;/article/title&quot;&gt;
+       &lt;title&gt;This is a test document&lt;/title&gt;
+       &lt;abstract&gt;
+         &lt;para&gt;Abstract of my test article&lt;/para&gt;
+       &lt;/abstract&gt;
+     &lt;/collection:xpath&gt;
+   &lt;/collection:resource&gt;
+   &lt;collection:resource name=&quot;test.gif&quot; lastModified=&quot;1011011579000&quot;
date=&quot;1/14/02 1:32 PM&quot;&gt;
+ &lt;/collection:collection&gt;
+</pre><div class="note"><div><strong>Note: </strong>If you
need to use namespaces, you can set them as sitemap
+parameters in the form:<br xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0"></br>
+<tt xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">&lt;map:parameter
name=&quot;xmlns:<em>your prefix</em>&quot;
+value=&quot;nsURI&quot;/**&quot;&gt;</tt></div></div><h3
xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0"><strong>Another
</strong><strong>sample usage:</strong></h3><pre>      &lt;map:match
pattern=&quot;pages.xml&quot;&gt;
+        &lt;map:generate type=&quot;xpathtraversable&quot; src=&quot;blockcontext:/&quot;&gt;
+          &lt;map:parameter name=&quot;depth&quot; value=&quot;4&quot;/&gt;
+          &lt;map:parameter name=&quot;exclude&quot; value=&quot;xslt$|xmap$&quot;/&gt;
+          &lt;map:parameter name=&quot;xmlFiles&quot; value=&quot;\.jx$&quot;/&gt;

+          &lt;map:parameter name=&quot;xpath&quot; value=&quot;/*/content/title&quot;/&gt;
+        &lt;/map:generate&gt;
+        &lt;map:serialize type=&quot;xml&quot;/&gt;
+      &lt;/map:match&gt;
+</pre>This sitemap fragment will execute the &quot;<tt>/*/content/title</tt>&quot;
XPath
+expression for all XML files (including the ones ending with &quot;<tt>.jx</tt>&quot;
but
+excluding the ones ending with &quot;<tt>xslt</tt>&quot; or &quot;<tt>xmap</tt>&quot;)
for a depth
+of 4 nesting across every block defined in the current block.</div><div class="editUrl"><div><em>Errors
and Improvements?</em> If you see any errors or potential improvements in this document
please help
         us: <a href="http://cocoon.zones.apache.org/daisy/cdocs/873?branch=1&language=1">View,
Edit or comment</a> on the latest development version (registration required).
       </div></div></div>
     </div>



Mime
View raw message