Hello.

I'm trying to get a better understanding of axkit by writing my own simple taglib, but I am unable to get it to work properly.

I simply want it to print the current time by calling perl's time() function, but when I run apache in single process mode the value only gets updated the first time and stays the same through subsequent reloads.

I am running with

AxNoCache On

and keep-alive has been disabled on the http server.

Any clues to what I am doing wrong will be extremely helpful.


My taglib looks like the following piece of code:


package MyTime;


use strict; use Apache::AxKit::Language::XSP;


use vars qw/@ISA $NS $VERSION/;



@ISA = ('Apache::AxKit::Language::XSP'); $NS = 'http://local/xsp/time/v01'; $VERSION = "0.1";

sub parse_start {
    my ($e, $tag, %attribs) = @_;


if ($tag eq 'include-time') { $e->start_expr($tag); # creates a new { ... } block return '';


} else { die ("unknown tag: $tag"); } }

sub parse_end {
    my ($e, $tag) = @_;


if ($tag eq 'include-time') { $e->append_to_script('time()'); $e->end_expr(); }


return ''; }


1;



My xsp file looks like this:


<xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core";
    xmlns:time="http://local/xsp/time/v01";
    xmlns="uri://axkit.org/NS/Default"
    language="Perl">
    <page>
        <body>
            <heading>Hello World</heading>
            It is now: <time:include-time />
        </body>
    </page>
</xsp:page>

With regards
--
Jan Bauer Nielsen
Center of Knowledge Technology, Technical Knowledge Center of Denmark
Anker Engelunds Vej 1, Postboks 777, 2800 Kongens Lyngby, Denmark

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



Reply via email to