Hold on there cowboy.  This question is for C++ not Java.

>Could someone tell me how/when/where the "document()" XSLT function
>actually happens...
The document() function code is found in src\XSLT\FunctionDocument.cpp

>I am using XML::Xalan (and Perl) to bind to Xalan C++ and currently
>destroying the .xsl each time it is used..
Clearly you can compile the stylesheet and re-use it . Possibly passing
parameter values for
updated .xml files,  however,  I'm not sure if it's feasible to cache
that many source documents,  hopefully others will provide better solutions
for problem.

Paul


                                                                                       
                                             
                      "Joseph                                                          
                                             
                      Kesselman"               To:       [EMAIL PROTECTED]      
                                             
                      <[EMAIL PROTECTED]        cc:       (bcc: Paul 
Dick/Cambridge/IBM)                                             
                      om>                      Subject:  Re: Xalan C++ document() tech 
question                                     
                                                                                       
                                             
                      06/25/2002 09:14                                                 
                                             
                      AM                                                               
                                             
                      Please respond to                                                
                                             
                      xalan-dev                                                        
                                             
                                                                                       
                                             
                                                                                       
                                             




>Could someone tell me how/when/where the "document()" XSLT function
>actually happens...

The FuncDocument class currently implements this. Note that it's basically
a call to DTMManager's getDTM operation.

The current implementation of DTMManager does perform some caching, so if
you're repeatedly accessing the same document within a single
transformation, I _think_ we will simply re-access the same DTM.

If you want to do some explicit caching, the easiest approach would be to
assign the retrieved document to an XSLT variable and then use the
variable, possibly via our provided nodeset() extension function.

(It's worth noting that the current working draft for XSLT2 removes the
need for that extension; the current plan is that it will allow you to
directly search variables containing "temporary trees".)

______________________________________
Joe Kesselman / IBM Research




Reply via email to