There are various techniques you can use to reduce memory requirements. If you are processing a large collection of small input documents then the simplest is probably to use saxon:discard-document() which allows each document to be garbage-collected after use.
Michael Kay

From: [] On Behalf Of Cecil New
Sent: 01 February 2008 20:59
To: Mailing list for SAXON XSLT queries
Subject: Re: [saxon] text output method

That did the trick, thanks a bunch.  I did have to throw a lot of heap space at it (I used -Xmx1000m ... not sure I needed that much).

Is this technique limited by memory?  I am processing a large collection of xml docs for import into a database.

thanks again for your quick responses!

On Feb 1, 2008 12:26 PM, Martin Honnen <> wrote:
Cecil New wrote:
> I am creating a CSV file from a collection of xml documents using the
> text output method.  The second and following lines have a blank at the
> beginning.  I cannot figure out how to suppress it.

I get the same result with Saxon and with Altova.
If I change the query to

declare variable  $FS := ',';
declare variable  $RS := '&#10;';
declare function local:sequence-to-csv($seq) as xs:string
string-join(for $row in ("_1_" , "_2_" , "_3_")
concat(local:sequence-to-csv($row),$RS), "")

then the result is as you want it, with no whitespace at the beginning
of the line 2 and 3.


       Martin Honnen

This email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
saxon-help mailing list