Subject: Re: [xsl] Dynamic pipelining in XSLT 2.0 w/ Saxon extensions From: Florent Georges <darkman_spam@xxxxxxxx> Date: Tue, 19 Jun 2007 09:56:13 +0200 (CEST) |
"M. David Peterson" wrote: Hi > in theory one could easily use an extension function to > implement each chain of the pipeline, using a Hashtable to > store compiled transformation file if it's the first time > it's been accessed. But IMHO this approach has the drawback to use extension functions (other that those built-in within Saxon). Even if using saxon:transform() locks you to Saxon [1], it eases the installation for your users. You can just say "that requires Saxon X.Y, just download it and invoke Saxon the usual way", instead of explaining where to install the different pieces and how to modify the classpath in Java or .Net. If scalability regarding the number of input documents is of concern, you can take several approaches. You can compile all the stylesheets once before processing the inputs if you know that almost all stylesheets will be used. Or if you can process recursively each input (each step apply the next one, the last one apply the next input), you can compile the stylesheets the first time they are used then pass them to the folowing steps/inputs. You can also use a user function that memoizes its result (if you are ready to use an extension attribute that makes an xsl:function to memoize its outputs ;-p). IMHO that would be the most generic way to cache compiled stylesheets. Note Gestalt provides the same functionality through the gestalt:function extension instruction. [1] Actually, that would locks you to an XSLT 2.0 processor that has the same functionalities, thanks to @use-when. In addition, I think that would be possible to design your stylesheets to be used without the pipeline in XSLT itself (with additional work writing a shell script or a piece of Java code), and then provide this additional facility to your user through saxon:transform(). Or you can also wait for XProc ;-) Regards, --drkm _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Dynamic pipelining in XSL, M. David Peterson | Thread | Re: [xsl] Dynamic pipelining in XSL, M. David Peterson |
[xsl] grouping nesting items, inclu, Don Smith | Date | RE: [xsl] Dynamic pipelining in XSL, Michael Kay |
Month |