On Wed, 5 Jul 2000, Paul Lindner wrote:
> I've been toying with using the Apache::ASP custom tag feature to
> support cold-fusion like applications. I don't think it will be too
> hard; reading the spec it appears you need to make a list of named
> queries and then use <cfoutput> tags with #fieldname# entries.
Not to dismiss Joshua's interesting looking extensions to Apache::ASP, but
have you checked out AxKit's SQL taglib stuff?
Here's an XSP to extract rows from a messages table:
<xsp:page
language="Perl"
xmlns:sql="http://www.apache.org/1999/SQL"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>
<page title="SQL Search Results">
<sql:execute-query>
<sql:driver>Sybase</sql:driver>
<sql:username>webboard</sql:username>
<sql:password>password</sql:password>
<sql:doc-element>options</sql:doc-element>
<sql:row-element>option</sql:row-element>
<sql:tag-case>lower</sql:tag-case>
<sql:null-indicator>yes</sql:null-indicator>
<sql:id-attribute>ID</sql:id-attribute>
<sql:id-attribute-column>msgid</sql:id-attribute-column>
<sql:query>select * from Messages</sql:query>
<sql:count-attribute>count</sql:count-attribute>
</sql:execute-query>
</page>
</xsp:page>
This is then styled using XSLT in the next part of the pipeline. My box
can deliver 14 hits/sec on this (executed and styled using XSLT on every
hit). Not exactly blazing, but fast enough for a lot of uses.
And don't be put off by the verbosity - all this can be modularised in
external entities and/or taglibs.
--
<Matt/>
Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org