cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "insight49@gmail.com" <insigh...@gmail.com>
Subject Re: Flowscript - delete file
Date Sat, 29 Dec 2012 15:56:07 GMT
Hi Peter,

It's not flowscript, but I believe one can also use the source-writing 
transformer to delete xml files from the filesystem:

<page>
    ...
    <source:delete>
      <source:source>context://doc/editable/my.xml</source:source>
    <source:delete>
    ...
  </page>

One can insert the exact filename via a sitemap parameter/xslt variable earlier in the chain,
then use:

<map:transform type="write-source"/>

to delete.

See: https://cocoon.apache.org/2.1/userdocs/sourcewriting-transformer.html

Dan




On 2012-12-29 3:05 AM, Peter Sparkes wrote:
> Solved
>
> I found the answer at 
> http://markmail.org/message/7psype56uhu5kbad#query:+page:1+mid:ezqkl6i255bjdw75+state:results
>
> I amended file.delete(); to:
>
> file["delete"]();
>
> and it works,  the file is deleted. However, I don't know why it works
>
> Thank you all for your help
>
> Peter



Mime
View raw message