> But I am not 100% sure it will get rid of all possible optimizations. I.e.,
when the processor sees the fn:doc calls, it might try to pre-process them
while at the same time already doing template processing. I don't think any
processor optimizes so strongly, but that may be just a matter of time.
>
Saxon has a switch to control whether calls to doc() or document() with a
statically-known URI should be pre-evaluated at compile time; but the default
is false, because accessing documents that change over time is rather common.
Michael Kay
Saxonica
|