[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: read/write in the same xml file

Subject: Re: read/write in the same xml file
From: abbouh <abbouh@xxxxxxxxxxxxxxxxx>
Date: Mon, 09 Jun 2003 18:22:52 +0000
java read write xml
 i think i need absolutely the same file,because in my application
i have to write for each paragraph its place in the output file (with
bits)
so at every writing text i have to add length(text) to old counter,
for this reason i decided to use a file compte.xml which will be
overwrited after each readind text.
the problem still exist if you use <redirect:close> between
reading an closing?

Lars Huttar a écrit :

> > yes,i'm literally trying to overwrite the file "compte.xml" at
> > the same time as i 'm reading it in
>
> Operating systems will often lock a file that is being read,
> so that it can't be written at the same time.
> This make sense because otherwise you'd have race conditions,
> where the file might get truncated or partially overwritten
> before the reading is finished, so that the input could be
> invalid.
>
> > my command line is:
> > java org.apache.xalan.xslt.Process -IN catalogue.xml -XSL
> > compte.xsl -OUT
> > compte.txt -TEXT -PARAM file_cnf compte.xml
> >
> > for me in this stylesheet the input file and output file aren't as
> > important as  the extern file compte.xml
> > thanks
>
> My solution would be, first move/rename the input file compte.xml
> to a different filename, then run the stylesheet which writes
> to compte.xml.  I suspect that will solve your problem.
> (Obviously this will mean you'll need two parameters instead
> of one, to your stylesheet, if you're going to continue
> to use document() instead of the source XML document.)
>
> Lars
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.