And talking of that,
If I don't reparse the XSLT, is it possible to change the
parameters after the
first transform?
You can compile the stylesheet into a 'templates' object that can be
reused with different parameters without incurring the stylesheet parse
cost each time. I think the 'template' terminology comes from an early
Microsoft implementation and has just stuck, even though I think it's a
misnomer.
Along these lines, if anybody can code a templates object that can
include/import a regular stylesheet that would be really good (or
vice-versa - a regular stylesheet that can import a templates object,
possibly through a resolver) - I have some large stylesheets (4000 lines
+) that import a tiny generated-at-runtime stylesheet (50+ lines) which
means for every transform I incur the cost of parsing the larger
stylesheets. I've asked before and I think Mike has said that the way
the processor constructs the stylesheet internally means its not
possible - is this still the case?
As it happens, parsing the stylesheet from an in-memory string is still
really quick, but it would be a better solutions to use the templates
object.
cheers
andrew