You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Matthew L. Avizinis" <ml...@gleim.com> on 2002/02/15 21:41:59 UTC

redirect:write append attribute

Hello all,
I am using 2.2.D10 and tried 2.3.0.  Does the redirect:write append
attribute actually supposed to work?
I've tried
<redirect:write file="foo.xml" append="true">

and

<redirect:write file="foo.xml" append="yes">

and yet Xalan still seems to open the file as if new and overwrite any
existing content.  Or should I be using some other append value not
documented?
thanks,
   Matthew L. Avizinis <ma...@gleim.com>
Gleim Publications, Inc.
   4201 NW 95th Blvd.
 Gainesville, FL 32606
(352)-375-0772 ext. 101
      www.gleim.com <http://www.gleim.com>

=======================================================================
com·put·ing (kum' pyoot ing)
1. n the art of calculating how much time you wasted and money you spent in
a doomed attempt to master a machine with a mind of it's own. --from
computing: A HACKER'S DICTIONARY


RE: redirect:write append attribute

Posted by "Matthew L. Avizinis" <ml...@gleim.com>.
I would, but I'm not very good with Java, except to drink it when pulling an
all-nighter....

> -----Original Message-----
> From: Gary L Peskin [mailto:garyp@firstech.com]
> Sent: Friday, February 15, 2002 5:21 PM
> To: xalan-dev@xml.apache.org
> Subject: RE: redirect:write append attribute
>
>
> Matthew --
>
> Looking at the code, it seems like this should work.  The extension
> calls:
>
>       FileOutputStream ostream = new FileOutputStream(file.getPath(),
> append);
>
> where append should be set to a boolean true as a result of your
> redirect:write element.  Perhaps this parameter of the FileOutputStream
> constructor does not work on your platform.  Can you write a small test
> program that will open a file in append mode using this constructor and
> see if that works on your platform?
>
> Gary
>
> > -----Original Message-----
> > From: Matthew L. Avizinis [mailto:mla@gleim.com]
> > Sent: Friday, February 15, 2002 12:42 PM
> > To: xalan-dev@xml.apache.org
> > Subject: redirect:write append attribute
> >
> >
> > Hello all,
> > I am using 2.2.D10 and tried 2.3.0.  Does the redirect:write
> > append attribute actually supposed to work? I've tried
> > <redirect:write file="foo.xml" append="true">
> >
> > and
> >
> > <redirect:write file="foo.xml" append="yes">
> >
> > and yet Xalan still seems to open the file as if new and
> > overwrite any existing content.  Or should I be using some
> > other append value not documented? thanks,
> >    Matthew L. Avizinis <ma...@gleim.com>
> > Gleim Publications, Inc.
> >    4201 NW 95th Blvd.
> >  Gainesville, FL 32606
> > (352)-375-0772 ext. 101
> >       www.gleim.com <http://www.gleim.com>


RE: redirect:write append attribute

Posted by Gary L Peskin <ga...@firstech.com>.
Matthew --

Looking at the code, it seems like this should work.  The extension
calls:

      FileOutputStream ostream = new FileOutputStream(file.getPath(),
append);

where append should be set to a boolean true as a result of your
redirect:write element.  Perhaps this parameter of the FileOutputStream
constructor does not work on your platform.  Can you write a small test
program that will open a file in append mode using this constructor and
see if that works on your platform?

Gary

> -----Original Message-----
> From: Matthew L. Avizinis [mailto:mla@gleim.com] 
> Sent: Friday, February 15, 2002 12:42 PM
> To: xalan-dev@xml.apache.org
> Subject: redirect:write append attribute
> 
> 
> Hello all,
> I am using 2.2.D10 and tried 2.3.0.  Does the redirect:write 
> append attribute actually supposed to work? I've tried 
> <redirect:write file="foo.xml" append="true">
> 
> and
> 
> <redirect:write file="foo.xml" append="yes">
> 
> and yet Xalan still seems to open the file as if new and 
> overwrite any existing content.  Or should I be using some 
> other append value not documented? thanks,
>    Matthew L. Avizinis <ma...@gleim.com>
> Gleim Publications, Inc.
>    4201 NW 95th Blvd.
>  Gainesville, FL 32606
> (352)-375-0772 ext. 101
>       www.gleim.com <http://www.gleim.com>