Re: AxKit and Apache version
On Sunday 03 February 2008 17:08:27 Martin Oldfield wrote: Matt Sergeant writes: On 3-Feb-08, at 4:47 AM, Vaclav Barta wrote: On Sunday 03 February 2008 01:11:57 Matt Sergeant wrote: Nope. Your best bet is to proxy through Apache2 onto an Apache 1.3.x backend with AxKit on. Well, that works, but reminds me I really should upgrade libxml2... There are new versions of XML::LibXML XML::LibXSLT - is there AxKit 1.x that's compatible with them? See the patch recently posted to the list by Martin Oldfield. Besides that, you'll also probably want this one: Well, they aren't enough. :-( The patched AxKit-1.7 (patch attached) on top of XML::LibXML-1.66, XML::LibXSLT-1.66, libxml2-2.6.30-r1 (gentoo ebuild) and libxslt-1.1.22 (also gentoo) fails with Mon Feb 4 10:11:38 2008] [error] [client 127.0.0.1] [AxKit] [Error] /german/style/frame-util.xsl:1: parser error : Document is empty\n\n^\n/german/style/frame-util.xsl where the XSL file is valid (provided the path is Apache htdocs path) and works with AxKit-1.62. Of course, there's always more combinations to try - do you have a working one? Bye Vasek -- http://www.mangrove.cz/ Open Source integration diff -ur AxKit-1.7.orig/lib/Apache/AxKit/ConfigReader.pm AxKit-1.7/lib/Apache/AxKit/ConfigReader.pm --- AxKit-1.7.orig/lib/Apache/AxKit/ConfigReader.pm 2005-07-14 20:43:33.0 +0200 +++ AxKit-1.7/lib/Apache/AxKit/ConfigReader.pm 2008-02-04 09:32:10.0 +0100 @@ -18,6 +18,7 @@ package Apache::AxKit::ConfigReader; use strict; +use Apache::URI; # use vars qw/$COUNT/; Only in AxKit-1.7/lib/Apache/AxKit: ConfigReader.pm~ diff -ur AxKit-1.7.orig/lib/Apache/AxKit/Language/HtmlDoc.pm AxKit-1.7/lib/Apache/AxKit/Language/HtmlDoc.pm --- AxKit-1.7.orig/lib/Apache/AxKit/Language/HtmlDoc.pm 2005-07-14 20:43:34.0 +0200 +++ AxKit-1.7/lib/Apache/AxKit/Language/HtmlDoc.pm 2008-02-04 09:29:04.0 +0100 @@ -69,7 +69,8 @@ xsl:template match=text()xsl:value-of select=.//xsl:template /xsl:stylesheet EOX -my $stylesheet = XML::LibXSLT-parse_stylesheet($style_dom); +my $xslt = XML::LibXSLT-new; +my $stylesheet = $xslt-parse_stylesheet($style_dom); my $results = $stylesheet-transform($dom); my $result; Only in AxKit-1.7/lib/Apache/AxKit/Language: HtmlDoc.pm~ diff -ur AxKit-1.7.orig/lib/Apache/AxKit/Language/LibXSLT.pm AxKit-1.7/lib/Apache/AxKit/Language/LibXSLT.pm --- AxKit-1.7.orig/lib/Apache/AxKit/Language/LibXSLT.pm 2005-08-10 14:21:56.0 +0200 +++ AxKit-1.7/lib/Apache/AxKit/Language/LibXSLT.pm 2008-02-04 09:30:15.0 +0100 @@ -122,7 +122,8 @@ return $provider; }; -$stylesheet = XML::LibXSLT-parse_stylesheet($style_doc); + my $xslt = XML::LibXSLT-new; +$stylesheet = $xslt-parse_stylesheet($style_doc); unless ($r-dir_config('AxDisableXSLTStylesheetCache')) { $style_cache{$style-key()} = Only in AxKit-1.7/lib/Apache/AxKit/Language: LibXSLT.pm~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AxKit and Apache version
On Monday 04 February 2008 11:21:01 Martin Oldfield wrote: Vaclav Barta writes: On Sunday 03 February 2008 17:08:27 Martin Oldfield wrote: Matt Sergeant writes: Well, that works, but reminds me I really should upgrade libxml2... There are new versions of XML::LibXML XML::LibXSLT - is there AxKit 1.x that's compatible with them? See the patch recently posted to the list by Martin Oldfield. Besides that, you'll also probably want this one: Well, they aren't enough. :-( The patched AxKit-1.7 (patch attached) on top of XML::LibXML-1.66, XML::LibXSLT-1.66, libxml2-2.6.30-r1 (gentoo ebuild) and libxslt-1.1.22 (also gentoo) fails with Mon Feb 4 10:11:38 2008] [error] [client 127.0.0.1] [AxKit] [Error] /german/style/frame-util.xsl:1: parser error : Document is empty\n\n^\n/german/style/frame-util.xsl where the XSL file is valid (provided the path is Apache htdocs path) and works with AxKit-1.62. Of course, there's always more combinations to try - do you have a working one? What a bore! Presumably it would be trivial to run apache under strace to see if it really is trying to open the right file ? Well, strace gives stat64(/german/style/frame-util.xsl, 0xbf8dac74) = -1 ENOENT (No such file or directory) stat64(/var/www/localhost/htdocs/german/style/frame-util.xsl, {st_mode=S_IFREG|0644, st_size=25832, ...}) = 0 open(/var/www/localhost/htdocs/german/style/.htaccess, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) stat64(/var/www/localhost/htdocs/german/style/frame-util.xsl, {st_mode=S_IFREG|0644, st_size=25832, ...}) = 0 getgroups32(0, NULL)= 1 getgroups32(1, [65534]) = 1 open(/var/www/localhost/htdocs/german/style/frame-util.xsl, O_RDONLY| O_LARGEFILE) = 4 which has at least a potential of being right... I'm successfully doing XSLT stuff on a Debian box: These are standard Debian etch packages: Package: libxml2 Version: 2.6.27.dfsg-2 Package: libxslt1.1 Version: 1.1.19-1 Package: libxml-libxslt-perl Version: 1.59-1 Ah, so you might also have a vulnerable libxml2 (see http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-6284 ) - unless Debian fixed it, of course... Bye Vasek -- http://www.mangrove.cz/ Open Source integration - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AxKit and Apache version
On Sunday 03 February 2008 01:11:57 Matt Sergeant wrote: On 2-Feb-08, at 1:58 PM, Jean-Michel Caricand wrote: I'm new with AxKit. I have a little question. Can I use AxKit 1.7.0 with mod_perl 2 ? Nope. Your best bet is to proxy through Apache2 onto an Apache 1.3.x backend with AxKit on. Well, that works, but reminds me I really should upgrade libxml2... There are new versions of XML::LibXML XML::LibXSLT - is there AxKit 1.x that's compatible with them? Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [SVN] [16] Bug fixes
Matt Sergeant wrote: On 30-Jul-06, at 2:59 PM, Tom Howe wrote: Hi, I have use axkit and probably will again one day and would like to continue to receive general updates but don't have any need to see subversion commit messages, especially if development ramps up to any degree. Can you filter them out? Maybe we should have a straw poll... I figured people would rather see commit messages to know progress is being made, but I'd be willing to hear the other view. If you say progress is being made, of course I'll believe you... :-) While I probably can throw the commit messages out automatically (when I get my network to a sane enough state for my spam filters to work again :-/ ), I'd prefer not to receive them in the first place (while keeping my subscription to axkit-users)... Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: moving to MacIntel
Hi, On Friday 14 April 2006 08:34, John Hurst wrote: I have AxKit succesfully installed on my PowerBook G4 running Mac OSX 10.4. Recently I acquired a MacBook Pro (IntelMac) and went to install AxKit. I have installed expat, Sablotron, XML::LibXML, XML::LibXSLT, and all the other modules that AxKit says it requires (following the same procedure that I used on the G4). However, I hit problems when I go to load an XML page in my browser (Safari). The error log from AxKit report below suggests that I'm missing LibXSLT, and when I try to reinstall that, I get repeated errors of the form shown in the cpan test trace below. It seems to be a module XML::LibXML::Common that is missing, but I have no idea XML::LibXML::Common has been split into a separate package some time ago - you probably need to install it explicitly... Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unicode libxml strangeness
Hi, On Wednesday 09 February 2005 16:05, [EMAIL PROTECTED] wrote: When the code below is run the xml is not well formed. To be more precise, the output via toString isn't well formed, the output via toFile _is_ well formed. What seems to happening is that toString is decoding the utf string \x{C3}\x{84} for some reason. toFile does not do this. IMHO STDOUT does it - when I change the binmode parameter to :utf8, I get the same data on standard output as in the file (perl 5.8.0, libxml 2.6.16 on Linux). Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache::AxKit::Plugin::AddXSLParams::Request
On Monday 11 October 2004 16:45, Tom Schindl wrote: I'd disagree because ?... is not part of the URI. Hmm, maybe I have a warped perception of what a URI is... Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Relative links to differently-styled pages
On Monday 04 October 2004 17:00, Michael Kröll wrote: Tom Schindl wrote: | Yes. I'd write an AxKit-Plugin which passes the request-uri to my file | as parameter. http://search.cpan.org/~khampton/Apache-AxKit-Plugin-AddXSLParams-Request-1 .01/Request.pm does exactly this. Yes, that's it - thanks. Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Relative links to differently-styled pages
Hi, I've tried experimenting with Apache::AxKit::StyleChooser::PathInfo to give my experimental AxKit site a few different styles - having pipelines like AxMediaType screen AxStyleName #default AxAddProcessor text/xsl /german/style/frame.xsl /AxStyleName AxStyleName 1- AxAddProcessor text/xsl /german/style/frame1.xsl AxAddProcessor text/xsl /german/style/link1.xsl /AxStyleName /AxMediaType Where link1.xsl simply adds /1- to all the links in the page. It works, except I'd like users to be able to switch between styles. I've been planning to add (during an XSLT transformation) an image in the shape of a close button, linking to the page in a style not displaying whatever the close button is supposed to close - but to construct the link, I need to know the URL of the page the stylesheet is transforming, and I cannot find any XSLT function which would give it to me... Is there some AxKit feature I should be using for this kind of thing? Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can AxKit provider access POSTed data?
On Monday 05 January 2004 08:55 pm, Arne Claassen wrote: I use this: sub handler { my $r = shift; $r = $r-filter_register(); # Required for AxKit Provider $query= Apache::Request-new($r); Yes, that's it. Thanks a lot. Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can AxKit provider access POSTed data?
On Sunday 04 January 2004 10:25 pm, Arne Claassen wrote: I don't know about CGI and Provider, but i'm using Apache::Request instead of CGI (smaller memory footprint as well) in my Provider Filter's and it works great On Monday 05 January 2004 04:36 pm, Sean Evans wrote: You probably want to check out $r-param in Apache::Request. OK, the consensus seems clear, but how do I get an instance of Apache::Request? My handler is sub handler { my $r = shift; $r = $r-filter_register(); # Required $r-print(HEAD); ?xml version=1.0? HEAD ... Its argument is an instance of Apache and the return value of filter_register is Apache::Filter. Is there a way to get Apache::Request in this setup, or is my configuration all wrong? Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can AxKit provider access POSTed data?
Hi, I'm trying out CGI::Wiki in the context of an AxKit site (AxKit::XSP::Wiki seemed quite limited last time I looked). I wrote a wrapper module (CGI::Wiki is a backend and doesn't actually format Wiki pages) and set it as an AxKit provider: Location /g/dyna/wiki SetHandler perl-script PerlHandler AxKit::Local::Wiki AxKit PerlSetVar Filter On AxContentProvider Apache::AxKit::Provider::Filter AxAddProcessor text/xsl /german/frame.xsl AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT /Location This works, but only if the forms generated by AxKit::Local::Wiki use the GET method (and the module's handler method gets the data using Apache::args). For editable pages, I'd obviously prefer to use POST, but how do I then access the data? Apache::args seems limited to what's in the request URL... Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Generalizing AxKit::XSP::Param names
On Friday 03 October 2003 09:45 am, Jrg Walter wrote: On Wed, Oct 01, 2003 at 09:49:26PM +0200, Vaclav Barta wrote: (which is later transformed into a table row). It works, but the same markup (actually about 3 times longer than the example above) must be repeated 5 times, which is awful. Is there a way to compute the parameter names, IOW can I specify my markup just once and then call the template with 1, 2 ... 5? Use Robin's AttrParam taglib, it lets you specify the param name in an attribute, or subtag. Using a subtag, something like this is possible: ... If that example still looks lengthy, then wait for the next release of Well, it is quite verbose, but at least it works now - thanks. Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Generalizing AxKit::XSP::Param names
Hi, I have a form producing quite a few parameters (a1, b1, t1, a2, b2, t2 ... a5, b5, t5), and another page which basically just displays the values from the first page. This second page uses XSP, and my custom taglib handles each parameter triple (i.e. a1, b1, t1) by markup like eq numbers:added numbers:num1param:a1//numbers:num1 numbers:num2param:b1//numbers:num2 numbers:sumparam:t1//numbers:sum /numbers:added /eq (which is later transformed into a table row). It works, but the same markup (actually about 3 times longer than the example above) must be repeated 5 times, which is awful. Is there a way to compute the parameter names, IOW can I specify my markup just once and then call the template with 1, 2 ... 5? Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Transformation from multiple sources
On Sunday 21 September 2003 04:36 pm, Jrg Walter wrote: On Saturday 20 September 2003 04:18 am, Vaclav Barta wrote: I think the problem is that AxKit fails to parse /gcgi/left.cgi because it reads it as a file. Is there some configuration setting (I thought about AxStyleProvider but which provider should I use?) making AxKit to go through Apache when fetching URLs? Exactly, AxKit parses the file as file. AxKit doesn't execute CGI's. Using axkit:// URLs, you can execute other AxKit pages and include the results, but I think this won't work with CGI. You may try http://localhost/gcgi/left.cgi instead, which will ask your apache via HTTP. An absolute URL with localhost also fails (which is a bug IMHO - AxKit shouldn't access resources which are not *in* an AxKit-enabled directory the AxKit way just because they're accessed *from* an AxKit-enabled directory), but http://127.0.0.1/gcgi/left.cgi works. Thanks for prodding me! :-) Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Transformation from multiple sources
On Saturday 20 September 2003 02:35 pm, Tod Harter wrote: I see what you mean, though its odd that the error you get is EXACTLY what I get when I need node-set(). I think that the problem may be that you Well, of course a program with well-designed error handling should give different errors for different error conditions, but who says AxKit error handling is well designed? cannot say document('/gcgi/left.cgi')/ because the result from document() is a result-tree-fragment. Honestly it seems like result-tree-fragments in It's quite possible that document() doesn't work in AxKit stylesheets, but how come nobody missed it so far? How do people put ad banners into their pages if not by including an extra document into a stylesheet? Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Transformation from multiple sources
Hi, I'd like to add some random decoration to my pages and thought I'll use the document() XSLT function to pull it in - but it causes internal AxKit errors... I have the attached stylesheet set up to transform XML documents (I simplified it for this posting to ignore the source document, but the original uses it successfully). The stylesheet stopped working after I added the variable declaration calling the document() function: xsl:variable name=leftcontent select=document('http://localhost/gcgi/left.cgi')/vocabulary/ http://localhost/gcgi/left.cgi is a valid URL returning the attached text/xml. But, when I try to access the composed XML document, I get 500 Internal Server Error; the apache error log (also attached) says a lot of things, most importantly IMHO [AxKit] [Error] Can't coerce GLOB to string in entersub at /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Apache/AxKit/Language/LibXSLT.pm line 124. What am I doing wrong? Is my XSLT syntax correct? Is document() supported by AxKit? Bye Vasek P.S. AxKit 1.62, LibXML 1.54, libxml2 20508, Apache 1.3.28. ?xml version=1.0 encoding=ISO-8859-2? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:variable name=leftcontent select=document('http://localhost/gcgi/left.cgi')/vocabulary/ xsl:template match=/ html /html /xsl:template /xsl:stylesheet [Wed Sep 17 08:19:28 2003] [notice] Apache/1.3.28 (Unix) AxKit/1.62 mod_perl/1.28 configured -- resuming normal operations [Wed Sep 17 08:19:28 2003] [notice] Accept mutex: sysvsem (Default: sysvsem) [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] fast handler called for /german/index.xml [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] checking if we process this resource [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] media: screen, preferred style: #default [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] Can't create cache directory '/usr/local/apache/htdocs/german/.xmlstyle_cache': Permission denied [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] Can't create cache directory '/usr/local/apache/htdocs/german/.xmlstyle_cache/c8': No such file or directory [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] Can't create cache directory '/usr/local/apache/htdocs/german/.xmlstyle_cache/c8/33': No such file or directory [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] getting styles and external entities from the XML [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] styles not cached - calling $provider-get_styles() [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] using XS get_styles (libxml2) [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] calling xs_get_styles_fh() [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] calling xs_get_styles_str() [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] xs_get_styles returned: , , body [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] Calling GetMatchingProcessors with (screen, , , , body) [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] get_styles: loading style modules [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] get_styles: looking for mapping for style type: 'text/xsl' [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] cache doesn't exist [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] some condition failed. recreating output [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] styles: Apache::AxKit::Language::LibXSLT(/german/frame.xsl) [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] about to execute: Apache::AxKit::Language::LibXSLT::handler parser match_cb: at /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Apache/AxKit/Language/LibXSLT.pm line 55. [Wed Sep 17 08:29:00 2003] [warn] [client 127.0.0.1] [AxKit] Caught an exception [Wed Sep 17 08:29:00 2003] [error] [client 127.0.0.1] [AxKit] [Error] Can't coerce GLOB to string in entersub at /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Apache/AxKit/Language/LibXSLT.pm line 124. [Wed Sep 17 08:29:00 2003] [error] [client 127.0.0.1] [AxKit] From: /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Apache/AxKit/Exception.pm : 9 [Wed Sep 17 08:29:00 2003] [error] [client 127.0.0.1] [AxKit] [Backtrace] Can't coerce GLOB to string in entersub at /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Apache/AxKit/Language/LibXSLT.pm line 124. Apache::AxKit::Exception::new('Apache::AxKit::Exception::Error','-text','Can\'t coerce GLOB to string in entersub at /usr/lib/perl5/si...') called at /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/AxKit.pm line 1015 AxKit::prep_exception('Can\'t coerce GLOB to string in entersub at /usr/lib/perl5/si...') called at /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/AxKit.pm line 173
AxKit sessions
Hi, I've been evaluating AxKit for a toy web app, and found surprisingly little about session management. There's Apache::AxKit::Plugin::Session, but its Wiki page (http://axkit.org/wiki/view/AxKit/ApacheAxKitPluginSession) states that if using v0.93, I you'll need to patch Session.pm and Auth.pm according to some CPAN URL which doesn't make a lot of sense to me... I can confirm that version 0.93 (which is what's in CPAN) indeed does not install cleanly; I could try to debug it, but isn't there something that works out of the box? Doesn't anybody use persistent state with AxKit-generated pages? Bye Vasek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]