A document has been updated: http://cocoon.zones.apache.org/daisy/documentation/1016.html
Document ID: 1016 Branch: main Language: default Name: TraversableGenerator (unchanged) Document Type: Sitemap Component (unchanged) Updated on: 3/27/08 8:49:59 PM Updated by: Luca Morandini A new version has been created, state: draft Parts ===== Short description ----------------- This part has been updated. Mime type: text/xml (unchanged) File name: (unchanged) Size: 941 bytes (previous version: 689 bytes) Content diff: (8 equal lines skipped) </p> <blockquote> --- <p>name the name of the source lastModified the time the source was last --- modified, measured as the number of milliseconds since the epoch (as in --- java.io.File.lastModified) size the source size, in bytes (as in --- java.io.File.length) date (optional) the time the source was last modified in --- human-readable form</p> +++ <ul> +++ <li><tt>name</tt> the name of the source <br/> +++ </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) <br/> +++ </li> +++ <li><tt>size</tt> the source size, in bytes (as in java.io.File.length) <br/> +++ </li> +++ <li><tt>date</tt> (optional) the time the source was last modified in +++ human-readable form</li> +++ </ul> +++ +++ <p class="note">The TraversableGenerator can browse block defined in the Servlet +++ Service Framework in addition to the resources in the current block.</p> </blockquote> </body> (1 equal lines skipped) Long description ---------------- This part has been updated. Mime type: text/xml (unchanged) File name: (unchanged) Size: 2940 bytes (previous version: 1363 bytes) Content diff: (2 equal lines skipped) <p><strong>Configuration options:</strong></p> --- <p><em>depth</em> (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>sort</em> (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. <em>reverse</em> (optional) Reverse --- the order of the sort <em>dateFormat</em> (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. <em>timeZone</em> --- (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. --- <em>refreshDelay</em> (optional) Sets the delay (in seconds) between checks on --- the source hierarchy for changed content. Defaults to 1 second. <em>root</em> --- (optional) Sets the the regular expression for the root pattern. --- <em>include</em> (optional) Sets the the regular expression for including --- sources based on their names.<em>exclude</em> (optional) Sets the the regular --- expression for excluding sources based on their names.</p> +++ <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/> +++ </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> +++ <p><strong>Example:</strong></p> +++ +++ <pre> <map:match pattern="pages.xml"> +++ <map:generate type="traversable" src="blockcontext:/"> +++ <map:parameter name="depth" value="4"/> +++ <map:parameter name="include" value="wsmain$|resource$|basepage$|\.(.+)"/> +++ <map:parameter name="exclude" value="xsl$|xmap$"/> +++ <map:parameter name="xmlFiles" value="\.jx$"/> +++ </map:generate> +++ <map:serialize type="xml"/> +++ </map:match></pre> +++ +++ <p>The sitemap fragment above will browse every block defined in the current +++ block via the Servlet Service Framework (look at the "blockcontext:/" +++ <tt>src</tt> attribute) and will include every resources in the +++ "<tt>wsmain/resource/basepage/*.</tt><tt>*</tt>" pattern (or combination of) +++ excluding those ending with "<tt>xsl</tt>" and "<tt>xmap</tt>".</p> +++ +++ <p class="warn">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 if the +++ <tt>include</tt> missed, say, the "resource" Regular Expression, it will match +++ only resources in the +++ <tt>"wsmain/</tt><tt>*</tt><tt><tt><tt>.</tt></tt></tt><tt>*</tt>"pattern.</p> +++ </body> </html>