All current XSLT processors require that the entire source tree be built
for transformation.  We'ed like to get to the point where we can build
pieces of the tree, throw away pieces of the tree, or even not build the
tree when we know the transformation can be streamed.  However, that's
something for the future.  The best we can do right now is to make the
in-memory representation as compact as possible, which we try to do.

If you have lots of documents, you will need lots of memory.  If you can
cache and reuse documents, that will save the parsing, construction, and
destruction overhead.  You can also play with the default block allocation
sizes for the various node types, but I wouldn't recommend that unless you
want to invest lots of testing to make sure your documents work well with
your changes.

Dave



                                                                                       
                        
                      "Murphy, James"                                                  
                        
                      <James.Murphy@exc         To:      "'[EMAIL PROTECTED]'"  
                        
                      elergy.com>               <[EMAIL PROTECTED]>             
                        
                                                cc:                                    
                        
                      12/10/2001 10:26          Subject: RE: Sanity Check - DOMs and 
XSLT                      
                      AM                                                               
                        
                      Please respond to                                                
                        
                      xalan-dev                                                        
                        
                                                                                       
                        
                                                                                       
                        




My understanding is that the SAXInputSource you describe is used to
generate
a XalaSourceTree for the entire document before a transformation can take
place.  So a DOM of sorts is created.

I guess I mis-spoke.  When I said DOM what I really meant was
XalanSourceTree.  The point being, the entire instance is loaded into
memory
not parsed and translated in a more streamlike manner.

If I have ~20MB instance documents to translate (and larger) my server's is
going to need a _lot_ of RAM.  And there will be a practical limit to the
size of the documents I can handle, no?

Jim




> -----Original Message-----
> From: Shane Curcuru [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 08, 2001 9:44 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Sanity Check - DOMs and XSLT
>
>
> Nope, most XSLT processors, Xalan included, work fine with either SAX
> or a DOM.  Check out the JAXP specs; XSLT processors that support the
> JAXP API are quite happy to accept streams, SAX events, or a DOM for
> any source seamlessly.
>
> Transformer t = transformerFactory.newTransformer(new
> SAXSource(myInputSource);
> // etc.
>
> Xalan will tend to also perform with SAX characteristics if fed SAX
> events, since that's how we primarily work internally.
>
> - Shane
>
> =====
> <eof aka="mailto:[EMAIL PROTECTED]";
>  BartSays="Nobody reads these anymore."/>
>
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
>



Reply via email to