Being seduced by the proud anouncements Matt made here, and seeing the axkit
and take23 sites,
I decided to play with AxKit myself. 
I have installed AxKit according to the AxKit(3) manpage, and (I think)
configured apache to load it.
It uses sablotron 0.44 and the latest expat from sourceforge - 1.95.1 below
it.
All the dependent modules (like XML::Sablotron and XML::Expat) and AxKit
itself were reporting 100% test success.
CPAN reports all dependencies are up-to-date.

I have been unable, however, to render smth very basic with it, with just
XML+XSL test (I haven't yet come to XPath games).

0) Please pardon my q(2) in case of my XML/XSL fault - I have never used XSL
before today, and perhaps I omitted smth basic. My bg comes from DSSSL/SGML
and every time I look at XSL I am thinking first of an associated DSSSL
stuff, then locating the appropriate tag in the XSL spec, then writing XSL.

1) My 1st problem, however, is smth to deal with Apache<->mod_perl<->AxKit
interaction at configs read time.
It's a minor problem, and I have a workaround (see below), so you can just
skip down to (2). But I just hoped some of the mod_perl gurus around may
have some clue here.

I have tried 1st to place just 
PerlModule AxKit
<Location /x>
    AllowOverride All
</Location>

into the apache httpd.conf,
and 
# Install AxKit main parts
SetHandler perl-script
PerlHandler AxKit

# Setup style type mappings
AxAddStyleMap text/xsl Apache::AxKit::Language::Sablot
AxAddStyleMap application/x-xpathscript \
  Apache::AxKit::Language::XPathScript

# Optionally set a hard coded cache directory
# make sure this is writable by the web server runtime user/group
AxCacheDir /usr/local/apache/htdocs/x/cache

into .htaccess under htdocs/x

It doesn't get to AxKit that way, despite AllowOverride All!

However, if I paste the contents of htdocs/x/.htaccess just before the
aforementioned </Location> in the global conf file, everything is fine in
the sense that the perl handler gets installed. I didn't find anything
similar mentioned in Stas' guide - am I missing smth obvious, or has it smth
to do with AxKit in general or as installed here?

2) In the case of the worked around (1), here's what I get for a tiny test
case in the error log:
[AxKit] : handler called for /x/test.xml
[AxKit] : checking if we process this resource
[AxKit] : media: screen, preferred style: #default
[AxKit] : getting styles and external entities from the XML
[AxKit] : styles and external entities not cached - calling get_styles()
[AxKit] : get_styles: creating XML::Parser
[AxKit] : get_styles: calling
XML::Parser->parse('/usr/local/apache/htdocs/x/test.xml')
[Wed Dec 13 16:17:27 2000] [error] [client 172.24.223.142] [AxKit]
[UnCaught] Bizarre copy of ARRAY in aassign at
/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm line 79.

[Wed Dec 13 16:17:27 2000] [error] [client 172.24.223.142] [AxKit]
[Backtrace] Bizarre copy of ARRAY in aassign at
/usr/local/lib/perl5/site_perl/5.6.0/Error.pm line 271
        Error::subs::run_clauses('HASH(0x5c2c38)', 'Bizarre copy of ARRAY in
aassign at /usr/local/lib/perl5/5.6.0/C...', '', 'ARRAY(0x22a690)') called
at /usr/local/lib/perl5/site_perl/5.6.0/Error.pm line 386
        Error::subs::try('CODE(0x1fd0dc)', 'HASH(0x5c2c38)') called at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/AxKit.pm line 643
        AxKit::handler('Apache=SCALAR(0x1fd0b8)') called at /dev/null line 0
        require 0 called at /dev/null line 0

test.xml:
<?xml version="1.0"?>
<?xml-stylesheet href="test.xsl" type="text/xsl"?>
<doc>
<title>The quick brown fox jumps over the lazy dog.</title>
</doc>

test.xsl:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="doc"><html>
                <head>
                        <title><xsl:value-of select="title"/></title>
                </head>
                <body>
                        <h1><xsl:value-of select="title"/></h1>
                </body>
</html></xsl:template>
</xsl:stylesheet>

I did check both for well-formedness with nsgmls, and both produce precicely
the ESIS I'd expect them to.

Can you please give some advice? An RTFM link would be appreciated as well.

Vassilii

-----Original Message-----
From: Khachaturov, Vassilli 
Sent: Tuesday, December 12, 2000 10:08 AM
To: 'Matt Sergeant'
Subject: RE: Trouble installing AxKit/perl5.6.0/solaris5.6


Thanks, Matt!
It has been built out of the box.
I am going to play with it now...

V.

-----Original Message-----
From: Matt Sergeant [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 11, 2000 4:29 PM
To: Khachaturov, Vassilli
Subject: RE: Trouble installing AxKit/perl5.6.0/solaris5.6


On Mon, 11 Dec 2000, Khachaturov, Vassilli wrote:

> I'm using Embedded Perl version v5.6.0 for Apache/1.3.14 (Unix)
> mod_perl/1.24_01
> AFAIU, this is not beta?

Yes, it is. Please use AxKit 1.1-pre.

Reply via email to