On Mar 26, 2008, at 5:19 PM, Luca Morandini wrote:
Vadim Gritsenko wrote:
On Mar 26, 2008, at 11:44 AM, Luca Morandini wrote:
As far as I understand, this boils down to let the "father" block
know about the "children" and let it access them somehow (like a
DirectoryGenerator spanning all blocks declared in the servlet-
service.xml to collect all the static pages and show them in a
menu).
You mean something like this?
http://svn.apache.org/repos/asf/cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/samples/sitemap.xmap
Awed I am :)
... though... why is it returning every document in sight, instead
of limiting itself to the "*.jx" ones ?
<map:match pattern="pages.xml">
<map:generate type="xpathtraversable" src="blockcontext:/">
<map:parameter name="depth" value="4"/>
<map:parameter name="xmlFiles" value="\.jx"/>
Perhaps because of this method?
protected boolean isXML(TraversableSource path) {
String mimeType = this.context.getMimeType(path.getName());
return this.xmlRE.match(path.getName()) || "text/
xml".equalsIgnoreCase(mimeType);
}
<map:parameter name="xpath" value="/*/content/title"/>
This parameter is optional, so you can omit it and get a better
performance.
Vadim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]