xsl-list
[Top] [All Lists]

RE: Importing compiled stylesheets

2005-06-09 06:13:31
Unfortunately the module mechanisms in XSLT don't really lend themselves to
independent compilation of modules, since much of the information you need
when compiling isn't available until all the modules are available. For
example if A imports B, then B can refer to a global variable defined in A.
Also, A can redefine a global variable defined in B, and the replacement can
even have a different type. So when you compile B, you don't know very much
about the environment it will run in, which reduces your ability to make
compile-time decisions.

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



-----Original Message-----
From: Andrew Welch [mailto:ajwelch(_at_)piper-group(_dot_)com] 
Sent: 09 June 2005 10:17
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Importing compiled stylesheets


The reason I would like to be able to import a compiled stylesheet is
not to use a functional library, but for performance.

I have this kind of setup:

A -> B -> C

Stylesheet A imports B, which imports C.

B and C are both reasonably large stylesheets.  A is generated per
request, is quite small and overrides specific templates in B or C
depending on the requirement.  I keep compiled copies of B and C in
memory, so when A is not needed I can just use the compiled version.
However, when A is needed, B and C must be parsed and built each time.

The fact that in XSLT the 'project specific' stylesheet must 
import the
'common' stylesheet, is why we really could do with a way of compiling
up that common stylesheet.

cheers
andrew

--~------------------------------------------------------------------
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>
--~--





--~------------------------------------------------------------------
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>
--~--