xsl-list
[Top] [All Lists]

RE: [xsl] XQuery basics

2008-06-05 14:13:59
XSLT has both include and import.  Whether an implementation shares 
memory between components is up to the implementation.

Do you know of any that share components? Is it even possible?

It's possible, of course, but it's not easy, because some properties of the
shared components would need to vary from one instance to another. The most
obvious example is import precedence.

There are two cases to consider. (a) sharing of included/imported modules
between multiple includes/imports within a single stylesheet, and (b)
sharing of modules across multiple stylesheets. I think if you did it at all
you would want to do (b). But that's even harder, because the bindings of
global variables, named templates, keys, etc etc can be different depending
on which stylesheet a module is included into. It requires a thorough
separation of internal data structures between the things that only depend
on what's locally defined within a module, and the things that depend on who
is using it. And of course the more you move to global optimization (such as
inlining of function calls, something Saxon-SA already does), the harder it
becomes.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>