Kinduv-Off Topic

Here should go questions about transforming XML with XSLT and FOP.
sderrick
Posts: 264
Joined: Sat Jul 10, 2010 4:03 pm

Kinduv-Off Topic

Post by sderrick »

I have a script that runs fine as far as speed in Oxygen.

But what takes a couple seconds in Oxygen takes 3 minutes on the command line? No indication of a failure?

Its a very simple identity transform on html source document.

Using the same version 9.3.04 EE in both.

Any hints as to why? Is there a way to increase the resources available to the parser when calling on command line?
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Kinduv-Off Topic

Post by adrian »

Hello,

These problems are usually caused by the lack of heap memory for Java. Look in the Saxon startup script for an -Xmx argument, if there isn't one you should add it as the first argument of java. If there is one, increase its value.
e.g.
java -Xmx256m -jar saxon9ee.jar ...

-Xmx256m should be enough, but if it still seems slow, you can go further: -Xmx384m or -Xmx512m

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
sderrick
Posts: 264
Joined: Sat Jul 10, 2010 4:03 pm

Re: Kinduv-Off Topic

Post by sderrick »

Adrian,

Actually Oxygen is working just fine. I wrote and tested the script in Oxygen.

Then deployed it to production which uses ant to run the transforms. Thats where it uses almost 100 times as much time to run as in Oxygen.

I have run it stand alone like so to verify it wasn't ant causing the problem.

Code: Select all


 java -jar -Xmx512m lib/saxon9he.jar s:build/etemp/my/epub_book_front.html -xsl:xslt/unicode2htmlentity.xsl -o:foo.html 
I know this isn't your problem. I was just looking for a hint as to why the script would run in less than a second in Oxygen but 3-4 minutes on the command-line? It just doesn't make any sense to me?

When I run the script in Oxygen, is the IDE calling the jar command and can I see what that execute command looks like?

thanks,

Scott
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Kinduv-Off Topic

Post by adrian »

It's possible that you have some references to remote resources(a DTD or a schema) in your input XML that Oxygen resolves locally via its XML catalog. As a result Oxygen runs the transformation immediately with the local files, while Saxon from the command line has to download the schema/DTD from the remote location before it can initiate the transformation.

So you should try to configure an XML catalog for Saxon. You could use Oxygen's XML catalog file or the specific catalog for your type of document.
For XHTML 1.0: <Oxygen>frameworks\xhtml\dtd\xhtmlcatalog.xml
For XHTML 1.1: <Oxygen>frameworks\xhtml11\dtd\xhtmlcatalog.xml

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply