You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Linden H van der (MI)" <H....@MI.unimaas.nl> on 2005/04/27 13:18:57 UTC

How to read the lastModifiedDate of the original XML file?

Hi,

my website consists of several XML pages that are transformed into HTML
using various XSL files. I'd like to add a "last modified" timestamp,
but that means I need the lastModifiedDate of the original XML, because
the javascript I used takes the moment of generation of the HTML page,
which is basically about 1 minute earlier than the current time.

Does anyone know an elegant way to achieve this?

Bye,

Helma van der Linden

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


Re: How to read the lastModifiedDate of the original XML file?

Posted by Upayavira <uv...@upaya.co.uk>.
Linden H van der (MI) wrote:
> Hi,
> 
> my website consists of several XML pages that are transformed into HTML
> using various XSL files. I'd like to add a "last modified" timestamp,
> but that means I need the lastModifiedDate of the original XML, because
> the javascript I used takes the moment of generation of the HTML page,
> which is basically about 1 minute earlier than the current time.
> 
> Does anyone know an elegant way to achieve this?

Either in flow with java.io.File() or using the DirectoryGenerator are 
the two options that come to my mind.

Regards, Upayavira

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


Re: How to read the lastModifiedDate of the original XML file?

Posted by Jorg Heymans <jh...@domek.be>.
Linden H van der (MI) wrote:
> Hi,
> 
> my website consists of several XML pages that are transformed into HTML
> using various XSL files. I'd like to add a "last modified" timestamp,
> but that means I need the lastModifiedDate of the original XML, because
> the javascript I used takes the moment of generation of the HTML page,
> which is basically about 1 minute earlier than the current time.
> 
> Does anyone know an elegant way to achieve this?


How about a custom transformer that reads the files and adds a meta 
timestamp tag to your document?

Alternatively (but I'm not sure) you could use an action that reads the 
timestamps and makes them request-local available for the stylesheet.

HTH
Jorg


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