It seems like an interesting concept in general. That is to say what if you could as Michael says have 'code snippets' that are effectively mapped to handlers and can be invoked.
Michael, I think the only way currently at least you would get this sort of functionality is to write a provider... Though I note that you CAN do some similar things with XInclude. IE your snippets could be simply served up from their own seperate pipelines and the results glued into the output via an include, either with XInclude or an XSLT document() style include. The document style is nice because you can create a template that wraps that up in whatever syntax you want (such as what you suggested). In fact the more I think about it the more I think you should build a small stylesheet that translates your snippet calls into a document() call. You wouldn't be able to actually INLINE the XSP, at least I haven't thought of a good way to do that yet, though I'm sure its possible. But you could call XSP libraries. The nice thing is they aren't limited to being XSP. Essentially this seems to be the way everyone here is evolving their web framework concept. On Friday 04 July 2003 07:07 pm, Michael A Nachbaur wrote: > I'm asking this here because, since I've been out of touch with AxKit's > internals for far too many months, I don't have enough data to answer my > own question. > > Basically, I would like to embed XSP code inline in XHTML files. So, I for > instance would only like regions of a file to be processed by XSP, and have > it's SAX events injected into the XHTML event stream. For instance: > > <html> > <body> > <p>boo</p> > <xsp:inline xmlns:xsp="blah://blahblah"> > <xsp:logic>print 2 + 5</xsp:logic> > </xsp> > </body> > </html> > > The main reason is that I don't want all XHTML files to be processed > through the XSP engine (which, last time I checked, was significantly > slower than plain-file-output). > > The above also could translate to taglibs. For instance: > > <html> > ... > <p><session:get-attribute name="username" > xmlns:session="foo://bar"/></p> ... > </html> > > The key benefits I could see are: (a) The entire page is not cached in > memory as a perl handler, (b) in my example, very little of the page would > be dynamic code, (c) (far-fetched) identical snippets of code from > different pages could just be cached as one handler in memory. > > I'm refactoring my content management system, and I'd really rather not > have the overhead of XSP in every single page if I want just one or two > pages in an entire site to have a dynamic snippet. -- Tod Harter Giant Electronic Brain http://www.giantelectronicbrain.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
