What if you build an XSLT pipeline, and then bring in the XSP generated content at the last stage using a <xsl:copy-of select="document('axkit:foo/bar.xsp')"/> call?

simon

On Wednesday, July 23, 2003, at 06:23 AM, Adam Griffiths wrote:

Hi,

I've been using AxKit for a while now and I'd really appreciate any ideas or
information on the following question.


XSP is great for generating dynamic XML documents and it's fast too. It also
caches the Perl code necessary to generate the dynamic XML page so multiple
requests only require it is parsed once. However as my application grows and
has an increasing number of XSP pages I am finding that many share identical
code / xsp-xml fragments, which makes maintaining them all is becoming
increasingly difficult.


I'm looking for a way to reuse XML fragments across many XSP pages, and thus
save allot of time composing them and maintaining them (there is a simple
example below). One way that could work would be to use XSLT before XSP in
the AxKit pipeline so a single tag could be expanded (transformed) into the
relevant XSP tags. However there is a major problem with that idea and that
is that AxKit won't cache the XSP page is it is preceded by an XSL
transform, and without the cache there would be a major drop in performance.


One thing that would solve my problem would be to be able to tell AxKit
where is should cache in the pipeline and then it would be possible to have:


XSL
 |
XSL
 |
XSP <- cache Perl code here
 |
XSL
 |
OUTPUT

Basically I'd like to take out the common factors from a group of xsp pages,
in a reusable extensible manor. Has anyone lese come across the same
problem? Is there a way that I can achieve this, or something like it?


Your comments and ideas would be greatly appreciated.

Regards

Adam
______________

Here is an example where this would prove very useful: If many XSP pages in
an application authenticate a user before displacing the page with XSP tags
something like this (using the imaginary authuser taglib):


<authuser:check>
<authuser:require>
<authuser:group>administrators</authuser:group>
<authuser:group>powerusers</authuser:group>
<!-- the user must be in the administrators or powerusers groups to
view this page -->
</authuser:require>
<authuser:invalid>
<!--The logged in user does not have the required access to view this
page -->
</authuser:invalid>
<authuser:valid>
<!--A valid user is logged in, display the page -->
<!-- #### page content goes here #### -->
</authuser:valid>
<autheruser:no-user>
<!-- no user is logged in, redirect to login page-->
</autheruser:no-user>
</authuser:check>


To changed the required groups of users would require every page is changed.
It could be simplified as:


<adminpage>
      <!-- #### page content goes here #### -->
</adminpage>

And then only the XSL transform would need to be updated to make changes to
the authentication of multiple pages.
________________________________________________________
s_p_a_m_t_r_a_p from:[EMAIL PROTECTED]
Do not email the above address or remove these two lines



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



-- anti-spam: do not post this address publicly www.simonwoodside.com -- 99% Devil, 1% Angel


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to