The API for invoking the transformation is exactly the same as always. You need to install Saxon-SA, you need the saxon-sa.jar file and the directory containing the license file on your classpath, and you need to ensure that you actually use Saxon-SA, either by using the entry point com.saxonica.Transform or by using net.sf.saxon.Transform with the -sa option on the command line; or if you are working from the Java API, instantiate the schema-aware version of the transformer factory, com.saxonica.TransformerFactoryImpl.
 
The problems with your command line are (a) that it's not invoking Saxon-SA, (b) that it doesn't put the license file on the classpath, and (c) that if you specify the -it option, then the <XML file> must be omitted.
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Fakirbaba
Sent: 30 December 2006 22:37
To: saxon-help@lists.sourceforge.net
Subject: [saxon] serial processing of large documents

Hi,
     I used SAXON8 in one of my projects to transform big XML sources into text files.  The problem that I am facing is that whenever I have a very large file, I have to increase the JVM heap size (java -Xmx512m, -Xmx1024m, etc.), othersie, I get the OutOfMemoryException.  I am afraid the size of the source XML will increase more.  So, I started to do some research to find a remedy of this problem.  And I found that SAXON8SA might have a remedy through "Serial processing of large documents".  But I am not sure how I can take advantage of that through Java API or even from the command line.  I tried the following:
 
java -cp lib\saxon8sa.jar net.sf.saxon.Transform -dt -it main -o output <XML file> <XSLT file>
 
But I get the usage.  It doesn't like the -it main option.
 
Any help on this would be greatly appreciated.
 
Thanks,
Fakir