I had two things on my mind: 1. I want the same Dynamic, XSP, code on many pages so and it would be a maintenance problem to have to edit every page to make a change to it. So I thought I could have a single tag, say <dynamiccontent/> on each page that requires it and have an XSLT expand it to XSP tags then the XSP processor process it.
2. The idea of outputting the PI <?xml-stylesheet href="NULL"> type="application/x-xsp"?> only if necessary, was that if <dynamiccontent/> exits then <?xml-stylesheet href="NULL"> type="application/x-xsp"?> would be needed, otherwise not. I will have the XSP code generated by the 2nd stage of the pipeline and it will be the same every time. Therefore I _would_ like AxKit to cache the perl bytecode, for efficiency. However I understand that AxKit might not know the 2nd stage results are going to be the constant and therefore decide not to cache the bytecode. So my two questions are: Can I tell AxKit to cache the perl bytecode even if the xsp is not the first stage of the pipeline? (but, naturally, re-generate it if any of the dependant files change.) Is there a better way to achieve my aim? I guess I could write a taglib but I like the idea of using xslt and the pipeline. Adam -----Original Message----- From: Aidas Kasparas [mailto:[EMAIL PROTECTED]] Sent: 31 July 2002 05:23 To: Adam Griffiths Cc: [EMAIL PROTECTED] Subject: Re: Pipelines Adam Griffiths wrote: > I'm interested in this idea of "embedding <?xml-stylesheet?> into the > XPathScript output". I'm actually using XSLT but I'd like to achieve > the same thing. Can you output PI's half way thought the pipeline to > add additional processing on the fly? Or must all PI's be in the > source document? > > Basically id like to output the PI <?xml-stylesheet href="NULL" > type="application/x-xsp"?> only if necessary. > > Good / Bad / Impossible Idea? > IMHO XSP is best suited as THE first processor in pipeline. This is due to the way how it works. If used it: 1) translates XSP document into source code in some programming language [perl, in case of AxKit]; 2) compiles that code [into perl's bytecode, in case of AxKit]; 3) execute compiled code. Now, if XSP is the first processor, then it can (and does) perform steps (1) and (2) just once per document (given it does not change), and only (3) step should be done for every request. If XSP is not the first processor, then for every request it should perform all 3 steps, because XSP code is not constant any more (otherwise why do you need preceding processor). Well, to perform steps (1) and (2) is not an extaordinary expensive job (it does not involve makeing system calls), but it is extra job and you better think how to avoid it. I'm affraid it is not even implemented (but may be wrong on this). What do you plan to use this for? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
