> -----Original Message-----
> From: Alexandr Efimov [mailto:[EMAIL PROTECTED]]
> 
> >Yes. AxKit's XSP module does this. Your SQL can be generated with the
> >AxKit::XSP::ESQL module, and then you can loop over the results
> >in your XSLT stylesheet using either xsl:foreach or (better still)
> > using a template.
> 
> Actually using AxKit::XSP::ESQL module seems to be much
> more complicated compared to calling a function in Template Toolkit,
> for example, it is inconvenient to write code like this:
> --------------
> <sql:execute-query>
>   <sql:driver>Sybase</sql:driver>
>   <sql:dburl>database=mydb</sql:dburl>
>   <sql:username>matt</sql:username>
>   <sql:password>millionaire</sql:password>
> 
>   <sql:query>SELECT MessageId, Subject FROM Messages</sql:query>
> </sql:execute-query>
> -----------------
> in Template, it would be something like
> [% data=fetch({sql=>"SELECT MessageId, Subject FROM Messages"}) %]
> and we can connect to database only once, probably before
> processing a Template. Also, logic seems to be easier to implement
> with Template than with AxKit.

The idea should be to have that stuff in an external file, just as I'm sure
you do with TT. You can do that with either entities or XInclude (though the
latter requires the current 1.5 beta). That way it becomes a bit easier.

Either that, or do what I've done on projects - write your own taglib that
completely and utterly hides the SQL from your pages.

Matt.

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

Reply via email to