cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: How to read the lastModifiedDate of the original XML file?
Date Wed, 27 Apr 2005 12:26:56 GMT
Linden H van der (MI) wrote:
> Hi Upayavira,
> 
> Thanks for the ideas.
> 
> I've rejected flow because it requires me to pass all files through a
> <map:call function="figureOutLastModifiedDate">, which doesn't look very
> elegant to me.
> 
> I've also been thinking about the DirectoryGenerator before, but I can't
> get beyond an aggregation or cinclude of the DirectoryGenerator result
> and a subsequent filtering using XSL (only extracting the info of the
> filename which I passed on as a parameter).
> 
> This also doesn't look elegant to me and it makes me wondering about
> performance.
> 
> Any ideas?

Well, without breaking into Java, no. That is the sort of thing I was 
thinking of.

You could write yourself an input module to do it, or...

You could try the JXPathMetaModule. Maybe something like
<map:match pattern="*">
   <map:generate src="{1}"/>
   <map:transform src="foo.xsl">
     <map:parameter name="date" value="{jxpath:new 
java.io.File('{1}').lastmodified()}"/>
   </map:transform>
   <map:etc...

Just a thought.

Regards, Upayavira

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


Mime
View raw message