What are you using as the source document to the transformation? If it's the big document, it will be built as a tree before the transformation even starts. I would recommend using a named template entry point, (e.g. xsl:template name="main" instead of xsl:template match="/") to avoid this happening.

(The fact that the debug shows the delay at the point where saxon:stream() calls doc() might suggest this isn't the problem. But I ran it myself, and changing it to use -it:main forced it to use streaming - unfortunately this is only readily apparent when using -t from the command line).

The Saxon-EE license that you get with oXygen only covers use of Saxon from within oXygen, so you only get access to the command line options that oXygen makes available.

Michael Kay
Saxonica


On 12/03/2012 14:59, Todd Gochenour wrote:
I'm running with oXygen Developer version 13.2 with Saxon-EE 9.3.0.5.  There is no timing option in the configuration dialog page.  My code is as follows:
 

<?xml version="1.0" encoding="UTF-8"?>


<xsl:stylesheet version="2.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://saxon.sf.net/"
xmlns:xsi="http://dummy.instance.net/"
xmlns:xs="http://dummy.schema.net/"
>

<xsl:template match="/">
<xsl:for-each select="saxon:stream(doc('test7.xml')/*/*/table_data)">
<xsl:variable name="table-name" select="@name"/>
<xsl:variable name="collection-uri" select="concat('db/',parent::*/@name,'/',$table-name)"/>
<xsl:for-each select="row">
<xsl:variable name="record">
<xsl:element name="{$table-name}">
<xsl:for-each select="field[@name]">
<xsl:element name="{if(number(substring(@name,1,1))=number(substring(@name,1,1))) then concat('_',@name) else @name}">
<xsl:value-of select="text()"/>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:variable>
<xsl:variable name="id" select="if($record/*/id) then concat('id-',$record/*/id) else concat('ndx-',position())"/>
<xsl:result-document href="{$collection-uri}/{$id}.xml">
<xsl:copy-of select="$record"/>
</xsl:result-document>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

 
This code functions on a file that is 112Megs in size.  It fails on a file that is 527Megs in size. The original export file is 704Megs in size.  The second and third files contain the xsi:type attribute which I've cast the xsi and xs namespaces to dummy hrefs.  A file of 485KB succeeds with these dummy attributes present.  The oXygen debug steps through the stream() function to the doc() function before spinning for a bit and then throwing the Java heap space exception.
 
I have yet to figure out how to extract Saxon from oXygen so as to run in command line mode.  I guess figuring this out is my next task.
 
 


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help