For a given transformation, multiple requests for the same document will
result in one copy of the document being parsed.  However, this does not
hold true from one transformation to the next, or between two threads or
processes.  If you want that level of caching, you'll need to hook into the
internals of Xalan.  The best way would be to replace Xalan's
implementation of the document() function with one of your own that manages
caching.  If you want to cache more than the document() function, there are
other behaviors you can override, but that again takes some fiddling with
the internals.

We could explore some public hook to do this, but it will take some time to
design and implement it, and we're quite backed up in work as it is.  If
your performance testing indicates that parsing is causing problems, then
think about a proposal that would work for you and bring it to the list for
discussion.

Dave



                                                                                
                              
                      Matthew James                                             
                              
                      Hanson                   To:      
[email protected]                          
                      <matthew.hanson@         cc:      (bcc: David N 
Bertoni/CAM/Lotus)                      
                      wcom.com>                Subject: Caching of XML Files    
                              
                                                                                
                              
                      12/06/2001 06:13                                          
                              
                      PM                                                        
                              
                                                                                
                              
                                                                                
                              



Hi!

I have a series of XML files that are used by any stylesheet via the XSL
document(...) function:

<xsl:value-of select="document('file.xml')/someElement[someAttr =
$matchVal]/@theDataAttr"/>

Do I need to worry heavy use of these XML files and I/O causing performance
problems during the XSL transformation?  If so, is there a caching
mechanism
that I can use?

Thanks!
Matt Hanson!





Reply via email to