I am in the process of learning AxKit and while playing with the demos 
have run into some problems.  Can anyone give me insight as to where I 
have gone wrong here or have I run into a bug.  If I remove the <xsp:expr>
<xsp:expr/>, it will run to completion.  Otherwise, thing blow up on me.  
I am running the most recent versions of all modules and libraries.  Here 
is the simple test script that I shows the behavior I am seeing.

<?xml version="1.0"?>
<?xml-stylesheet href="NULL" type="application/x-xsp"?>
<xsp:page language="Perl"
     xmlns:xsp="http://www.apache.org/1999/XSP/Core";
     xmlns:global="http://www.creITve.de/2002/XSP/Global";
 >
<html>
<head>
<title>testing</title>
</head>
<body>
<global:set-attribute name="Accesses">
<xsp:expr><global:get-attribute name="Accesses"/>+1</xsp:expr>
</global:set-attribute>
<p><global:get-attribute name="Accesses"/></p>
</body>
</html>
</xsp:page>

http.conf has the following for AxKit:

PerlModule AxKit
PerlModule Apache::AxKit::Plugin::Session

Alias /seshat/ "/usr/local/share/Seshat/www/"

<Directory /usr/local/share/Seshat/www>
     Options -All
     DirectoryIndex index.xsp
     AddHandler axkit .xml .xsp .dkb
     AddType text/xml .xsp
     AxGzipOutput Off
     AxDebugLevel 10
     PerlSetVar AxXPSInterpolate 1
     AxAddStyleMap application/x-xsp Apache::AxKit::Language::XSP
     AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT
     AxAddXSPTaglib AxKit::XSP::Util
     AxAddXSPTaglib AxKit::XSP::Param
     AxAddXSPTaglib AxKit::XSP::Global
</Directory>

error.log has the following:

[Thu Jun 13 11:34:19 2002] [notice] Apache/1.3.24 (Unix) AxKit/1.6 
mod_perl/1.26 configured -- resuming normal operations
[Thu Jun 13 11:34:19 2002] [notice] Accept mutex: flock (Default: flock)
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] fast handler 
called for /seshat/test.xsp
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] Content 
Provider Override: Apache::AxKit::Provider::File
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] [req] File 
Provider given $r: /usr/local/share/Seshat/www/test.xsp
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] checking if we 
process this resource
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] media: screen,
  preferred style: #default
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] Cache: key = 
2b28b58143ba24dfe760802db0fc9e85
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] Can't create 
cache directory '/usr/local/share/Seshat/www/.xmlstyle_cache': Permission 
denied
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] Can't create 
cache directory '/usr/local/share/Seshat/www/.xmlstyle_cache/2b': No such 
file or directory
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] Can't create 
cache directory '/usr/local/share/Seshat/www/.xmlstyle_cache/2b/28': No 
such file or directory
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] getting styles 
and external entities from the XML
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] styles not 
cached - calling $provider->get_styles()
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] using XS 
get_styles (libxml2)
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] calling 
xs_get_styles_fh()
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] calling 
xs_get_styles_str()
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] parse_pi: href 
= NULL
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] parse_pi: type 
= application/x-xsp
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] xs_get_styles 
returned: , , {http://www.apache.org/1999/XSP/Core}page
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] Calling 
GetMatchingProcessors with (screen, , , , {http://www.apache.org/1999/XSP/
Core}page)
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] get_styles: 
loading style modules
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] get_styles: 
looking for mapping for style type: 'application/x-xsp'
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] cache doesn't 
exist
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] some condition 
failed. recreating output
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] styles: Apache:
:AxKit::Language::XSP(NULL)
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] Style Provider 
Override: Apache::AxKit::Provider::File
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] [uri] File 
Provider looking up uri NULL
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] [uri] File 
Provider set filename to /usr/local/share/Seshat/www/NULL
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] about to 
execute: Apache::AxKit::Language::XSP::handler
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] XSP: parsing fh
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] Recompiling 
XSP script
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] package Apache:
:AxKit::Language::XSP::ROOT::usr::local::share::Seshat::www::test_2exsp; @
Apache::AxKit::Language::XSP::ROOT::usr::local::share::Seshat::www::test_2exsp:
:ISA = ('Apache::AxKit::Language::XSP::Page');
use Apache;
use Apache::Constants qw(:common);
use XML::LibXML;use Apache::AxKit::Plugin::Session;
use Time::Piece;
# Evil hack to globally prepare a session object. Actually, it is quite 
waterproof...
my $global;
{ my $handler = \&handler;
*handler = sub { $global = Apache->request->pnotes("GLOBAL"); goto 
$handler; }; }

#initialize xsp namespace
#initialize xsp namespace

sub handler {
my ($r, $cgi, $document) = @_;
my ($parent);

{ my $elem = 
$document->createElement(q|html|);$document->setDocumentElement($elem); 
$parent = $elem; }
{ my $elem = $document->createElement(q|head|);$parent->appendChild($elem)
; $parent = $elem; }
{ my $elem = $document->createElement(q|title|);$parent->appendChild($elem)
; $parent = $elem; }
{ my $text = 
$document->createTextNode(q|testing|);$parent->appendChild($text); }
$parent = $parent->getParentNode;
$parent = $parent->getParentNode;
{ my $elem = $document->createElement(q|body|);$parent->appendChild($elem)
; $parent = $elem; }
do { my ($attr_name); $attr_name = q%Accesses%; local($_) = "". do {.do 
{my ($attr_name); $attr_name = q%Accesses%;  my @_res = do {$attr_name =~ 
s/^(_|auth_|X)/X\1/; $$global{$attr_name};}; eval{if (wantarray) 
{ @_res; } else { join("",@_res); }} }+1}; $attr_name =~ s/^(_|auth_|X)/X\
1/; $$global{$attr_name} = $_; };
{ my $elem = $document->createElement(q|p|);$parent->appendChild($elem); 
$parent = $elem; }
{
     my $text = $document->createTextNode("".do {
my ($attr_name); $attr_name = q%Accesses%;  my @_res = do {$attr_name =~ s/
^(_|auth_|X)/X\1/; $$global{$attr_name};}; eval{if (wantarray) { @_res; } 
else { join("",@_res); }} }); # non xsp tag
     $parent->appendChild($text);
}
$parent = $parent->getParentNode;
$parent = $parent->getParentNode;
$parent = $parent->getParentNode;

return OK;
}

Script:
1 package 
Apache::AxKit::Language::XSP::ROOT::usr::local::share::Seshat::www::test_2exsp;
  
@Apache::AxKit::Language::XSP::ROOT::usr::local::share::Seshat::www::test_2exsp:
:ISA = ('Apache::AxKit::Language::XSP::Page');
2 use Apache;
3 use Apache::Constants qw(:common);
4 use XML::LibXML;use Apache::AxKit::Plugin::Session;
5 use Time::Piece;
6 # Evil hack to globally prepare a session object. Actually, it is quite 
waterproof...
7 my $global;
8 { my $handler = \&handler;
9 *handler = sub { $global = Apache->request->pnotes("GLOBAL"); goto 
$handler; }; }
10
11 #initialize xsp namespace
12 #initialize xsp namespace
13
14 sub handler {
15 my ($r, $cgi, $document) = @_;
16 my ($parent);
17
18 { my $elem = 
$document->createElement(q|html|);$document->setDocumentElement($elem); 
$parent = $elem; }
19 { my $elem = 
$document->createElement(q|head|);$parent->appendChild($elem); $parent = 
$elem; }
20 { my $elem = 
$document->createElement(q|title|);$parent->appendChild($elem); $parent = 
$elem; }
21 { my $text = $document->createTextNode(q|testing|);$parent->appendChild(
$text); }
22 $parent = $parent->getParentNode;
23 $parent = $parent->getParentNode;
24 { my $elem = 
$document->createElement(q|body|);$parent->appendChild($elem); $parent = 
$elem; }
25 do { my ($attr_name); $attr_name = q%Accesses%; local($_) = "". do {.do 
{my ($attr_name); $attr_name = q%Accesses%;  my @_res = do {$attr_name =~ 
s/^(_|auth_|X)/X\1/; $$global{$attr_name};}; eval{if (wantarray) 
{ @_res; } else { join("",@_res); }} }+1}; $attr_name =~ s/^(_|auth_|X)/X\
1/; $$global{$attr_name} = $_; };
26 { my $elem = $document->createElement(q|p|);$parent->appendChild($elem)
; $parent = $elem; }
27 {
28     my $text = $document->createTextNode("".do {
29 my ($attr_name); $attr_name = q%Accesses%;  my @_res = do 
{$attr_name =~ s/^(_|auth_|X)/X\1/; $$global{$attr_name};}; eval{if 
(wantarray) { @_res; } else { join("",@_res); }} }); # non xsp tag
30     $parent->appendChild($text);
31 }
32 $parent = $parent->getParentNode;
33 $parent = $parent->getParentNode;
34 $parent = $parent->getParentNode;
35
36 return OK;
37 }
38
[Thu Jun 13 11:34:23 2002] [warn] [client 10.1.4.2] [AxKit] Caught an 
exception
[Thu Jun 13 11:34:23 2002] [error] [client 10.1.4.2] [AxKit] [Error] 
Compilation failed: syntax error at (eval 26) line 25, near "{."
Global symbol "$attr_name" requires explicit package name at (eval 26) 
line 25.
Global symbol "$attr_name" requires explicit package name at (eval 26) 
line 25.
syntax error at (eval 26) line 25, near "; }"

[Thu Jun 13 11:34:23 2002] [error] [client 10.1.4.2] [AxKit] From: 
/usr/local/lib/perl5/site_perl/5.6.1/Error.pm : 148
[Thu Jun 13 11:34:23 2002] [error] [client 10.1.4.2] [AxKit] [Backtrace] 
Compilation failed: syntax error at (eval 26) line 25, near "{."
Global symbol "$attr_name" requires explicit package name at (eval 26) 
line 25.
Global symbol "$attr_name" requires explicit package name at (eval 26) 
line 25.
syntax error at (eval 26) line 25, near "; }"
         Error::throw('Apache::AxKit::Exception::Error', '-text', 
'Compilation failed: syntax error at (eval 26) line 25, near "{."...') 
called at /usr/local/lib/perl5/site_perl/5.6.1/mach/Apache/AxKit/Language/
XSP.pm line 114
         
Apache::AxKit::Language::XSP::handler('Apache::AxKit::Language::XSP', 
'AxKit::Apache=SCALAR(0x833fc18)', 
'Apache::AxKit::Provider::File=HASH(0x833fcf0)', 'Apache::AxKit::Provider:
:File=HASH(0x833feb8)', 1) called at /usr/local/lib/perl5/site_perl/5.6.1/
mach/AxKit.pm line 623
         AxKit::process_request('AxKit::Apache=SCALAR(0x833fc18)', 'Apache:
:AxKit::Provider::File=HASH(0x833fcf0)', 'ARRAY(0x824de58)') called at 
/usr/local/lib/perl5/site_perl/5.6.1/mach/AxKit.pm line 437
         AxKit::run_axkit_engine('AxKit::Apache=SCALAR(0x833fc18)', 'Apache:
:AxKit::Provider::File=HASH(0x833fcf0)') called at 
/usr/local/lib/perl5/site_perl/5.6.1/mach/AxKit.pm line 264
         eval {...} called at 
/usr/local/lib/perl5/site_perl/5.6.1/mach/AxKit.pm line 255
         AxKit::main_handler('AxKit::Apache=SCALAR(0x833fc18)', 
'Apache::AxKit::Provider::File=HASH(0x833fcf0)') called at /usr/local/lib/
perl5/site_perl/5.6.1/mach/AxKit.pm line 172
         AxKit::fast_handler('AxKit::Apache=SCALAR(0x833fc18)') called at 
/dev/null line 0
         eval {...} called at /dev/null line 0



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

Reply via email to