cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
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'{1}').lastmodified()}"/>

Just a thought.

Regards, Upayavira

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message