cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Askild Aaberg Olsen <ask...@xangeli.com>
Subject Re: Directory includes
Date Tue, 28 Jun 2005 08:44:45 GMT
It depends on the size and number of files. I think a DOM is built for 
each file, and Cocoon quickly runs out of memory then.

For a small number of files, where the filesize is low, the 
XPathDirectoryGenerator works very well. For other cases, the 
alternative approach from Derek is much better.

Askild
-

Derek Hohls wrote:

>Hmm - I could never get this approach to work... and I think
>the  DirectoryGenerator / CInclude approach might be more
>flexible.  Your choice!
>
>  
>
>>>>Yjanet@dsmdir.cea.fr 2005/06/28 10:22:01 AM >>>
>>>>        
>>>>
>Thanks, it seems to fit to my needs.
>
>Yvan
>
>-----Message d'origine-----
>De : Askild Aaberg Olsen [mailto:askild@xangeli.com] 
>Envoyé : mardi 28 juin 2005 10:18
>À : users@cocoon.apache.org 
>Objet : Re: Directory includes
>
>Janet Yvan wrote:
>
>  
>
>>I have a directory which contains many XML files which contain each one
>>element of the newsboard I want to display. So I need to do something like 
>><map:generate type="file" src="/my_directory/*.xml" element="my_element"/>
>>
>>One told me this would'nt work neither would <map:generate type="directory"
>>src="/my_directory/"/> which would only returns a file listing. What I need
>>is the whole content of the files, not only some pieces of information,
>>    
>>
>just
>  
>
>>as if I did something like what follows but without specifying any of the
>>filenames which may evolve from time to time, depending on submissions...
>><map:aggregate element="my_element">
>><map:part src="/my_directory/file1.xml"/>
>><map:part src="/my_directory/file2.xml"/>
>>...
>><map:part src="/my_directory/fileN.xml"/>
>></map:aggregate>
>>
>> 
>>
>>    
>>
>Seems like the XPathDirectoryGenerator is the thing for you:
>http://cocoon.apache.org/2.1/userdocs/generators/xpathdirectory-generator.ht 
>ml
>
>Another solution would be to use a combination of the DirectoryGenerator 
>and CInclude, but based on your usecase the XPathDirectoryGenerator 
>seems right.
>
>Askild
>-
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>For additional commands, e-mail: users-help@cocoon.apache.org 
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>For additional commands, e-mail: users-help@cocoon.apache.org 
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message