cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven D. Majewski" <sd...@virginia.edu>
Subject Re: Very large Generator file
Date Tue, 11 May 2010 14:22:54 GMT

[1] You might look at using Joost/STX which does streaming transforms.
It's not XSLT -- it's an xslt-like transformation language designed  
for one pass processing,
so STXPath is more restricted than XPath.

	http://joost.sourceforge.net/

We've used it within cocoon to extract data which is then may be  
transformed in a 2nd stage.
We've run into a few bugs, but we're not using the latest current  
version.
( I think there were some incompatibilities with the cocoon 2.1.* stx  
transformer and
   the newer joost libraries, but I haven't looked at this in quite a  
while. )


[2] I believe Saxon can do some transforms in a streaming mode. I  
think this extension
  requires one of the paid licensed versions of Saxon. I haven't tried  
this myself.

	http://saxonica.blogharbor.com/blog/_archives/2006/7/4/2084120.html

-- Steve Majewski


On May 11, 2010, at 4:51 AM, Huib Verweij wrote:

> Hi Jeff,
>
> You wrote: "I guess I was under the impression that SAX based xsl  
> transformers didn't use much memory regardless file size, but  
> perhaps that's not true?"
>
> It's true. However, when you do a XSLT transformation the entire XML  
> document needs to be available to the XSLT processor, because you  
> can access any node in the document, e.g. "/very/large/path/to/some/ 
> dark/corner/of/the/XML/node".
>
> I'm not sure about your use-case so I don't know if it will help,  
> but you could try using the MultiFragmentTraxTransformer from the  
> cocooncomponents project on Google code. It reduces memory  
> consumption drastically by allowing you to specify a fragment in the  
> XML that you want transformed. If you have a very large document  
> that looks like this:
>
> <root>
>   <item/>
>   <item/>
> ....
>    <item/>
> </root>
>
> and all you want to do is transform the <item/> elements then the  
> MultiFragmentTraxTransformer is your friend.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message