You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by David Delgranche <dd...@silicom.fr> on 2000/12/22 10:19:54 UTC

Problem using Redirect extension

Hi all,

I'm working with xalan j1.2 and I try to use the redirect extension. Il
fact my problem is that it seems to overwrite my file each time I call
redirect:write command in my XSLT stylesheet. I use the following:

I define at the beginning of my file a parameter:
<xsl:param name="MADFilePermanent" select="neuwfile.xml"/>

In a template I call:
<redirect:write select="$MADFilePermanent">
...
...
...
</redirect:write>

I call the template in which I have my redirect command many time but I
only have the result of lhe last call in my result file. 
Can anyone help me?? I'm really in a urge!
Thanks a lot
David

-- 
David DELGRANCHE - ddelgranche@silicom.fr
Silicom RĂ©gion Ouest
80 avenue des Buttes de Coesmes 35700 RENNES
Tel: 02 99 84 17 17
Fax: 02 99

Re: Problem using Redirect extension

Posted by Gary L Peskin <ga...@firstech.com>.
David Delgranche wrote:
> 
> Hi all,
> 
> I'm working with xalan j1.2 and I try to use the redirect extension. Il
> fact my problem is that it seems to overwrite my file each time I call
> redirect:write command in my XSLT stylesheet.

If you use redirect:write by itself, it will do an open, write, and
close.  This overwrites existing data.  Use the redirect:open and
redirect:close explicitly.  If redirect:write finds that the file is
already open, it will not reopen it.  This should fix your problem.

Gary