cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: SSF and UI modularization
Date Thu, 27 Mar 2008 00:30:19 GMT
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message