On 30 Jul 2014, at 12:57, Christian Schwaderer <c_schwaderer@hotmail.com> wrote:

Hi all,

after an hour of investigation I detected a behaviour of Saxon/C 0.31 beta which seems strange to me: If via PHP the method transformToFile is called with a parameter being the path/filename of an existing file Saxon/C adds the newly transformed content to the old file.

If this is intended I cannot see why.
I think it would be better if Saxon simply would replace the old file with a new one (or would do nothing but displaying an error message).

This is definitely not intended. I would say this is a bug. I have create a bug issue for this which I will try to reproduce and fix accordly, please see: https://saxonica.plan.io/issues/2115

As a workaround you can delete using a PHP command before you call transofmrToFile if the file exists.

O'Neil Delpratt
Software Developer, Saxonica Limited Email: oneil@saxonica.com
Tel: +44 118 946 5894
Web: http://www.saxonica.com
Saxonica Community site: http://dev.saxonica.com
Bug tracking site: https://saxonica.plan.io/