Re: Compiling
Why not use the bytecode compiler instead, or PAR::Filter::*. But I guess the real question is what to do with xsp files which defer perl code generation to load time. Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Removing eval from AxKit?
At 15:40 Uhr +0100 09.02.2005, Arne Skjaerholt wrote: Still, I'm not afraid of getting my hands dirty, so the following occured to me: maybe it would be possible to alter the inner workings of the taglibs so that instead of evaling code all the time, It's not eval'ing all the time, but only when the respective .xsp file changes. This way, it can generate optimized perl code that should be able to build your XML output tree as fast as it can get. Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to return XML code from taglib?
At 11:36 Uhr +0100 31.01.2005, Lars Skjærlund wrote: But I cannot figure out how to return the string literal - ie., with the XML tags intact. @EXPORT_TAGLIB= ('yourfunc():as_xml=>1'); then just return the xml string from the function. Christian. PS. you're using an invalid To address: To: ^-- wrong here - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [RFC] Need A Name: Yet Another Shopping Cart
At 14:14 Uhr -0800 09.12.2004, Michael A Nachbaur wrote: (..) though I might change it as the Package::Names::Are::Getting::Way::Too::Long. There are two tricks I'm sometimes using with long package names: (works with OO packages only) - global namespace aliasing. Just do: *Foo::= *AxKit::App::Foo::; albeit that's something with global effect to the whole program, so the problem of choosing a non-conflicting short namespace is just moved from the author to the user of the package. - lexical "aliasing": my $Foo= "AxKit::App::Foo"; my $foo= new $Foo; # see also http://pflanze.mine.nu/~chris/scripts/extlib/Chj/load.pm At 17:56 Uhr -0500 09.12.2004, Christopher H. Laco wrote: Unltimately, I think I'm going to apply for Business::Commerce. Plain ole Commerce would be nice to keep the modules names short, but it does seem to fit well into Business:: for a set generic commerce building blocks. I'm wondering if you really need to put multiple modules into such a namespace. If you split your functionality into independent chunks, you might find that most of your modules don't have anything to do with Business:: at all. Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Success Story
At 23:28 Uhr +0100 27.09.2004, Matt Sergeant wrote: - Memory consumption is a pain (I'm assuming you are already using a proxy in front of the mod_perl apache? mod_accel (apache 1.x) does work very well for me, though my installations aren't really large scale) Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XML::LibXML/XSLT bug: escaping in comments
Hello (Note: because I'm a bit too lazy to narrow this down to a smaller test case ATM, and since maybe someone here knows more about it, I'm posting here first instead of directly to rt.cpan.org) There must be a bug somewhere in handling escaping of strings inside comments. When trying out the example .xsl/.xml combo downloaded from http://slideml.org/specification/slideml_1.0/ (zip file), (you can see them here: http://elvis-5.mine.nu/~chris/ml/2html_ext_css.xsl http://elvis-5.mine.nu/~chris/ml/slideml_manual.xml ) I get a correct result when using "xsltproc", but a different one when using perl to do the same (using this script: http://elvis-5.mine.nu/~chris/ml/xsltransform). Wrong (javascript does not work): http://elvis-5.mine.nu/~chris/ml/t1/slide_1.html Correct (javascript works: space key is trapped): http://elvis-5.mine.nu/~chris/ml/t2-xsltproc/slide_1.html The difference is: [EMAIL PROTECTED] ml > diff -u t1/slide_1.html t2-xsltproc/slide_1.html --- t1/slide_1.html 2004-09-10 02:14:16.0 +0200 +++ t2-xsltproc/slide_1.html2004-09-10 02:27:56.0 +0200 @@ -26,7 +26,7 @@ function loaded() { - if (navigator.userAgent.indexOf("MSIE") > 0) { + if (navigator.userAgent.indexOf("MSIE") > 0) { document.attachEvent("onkeypress",onKeyPressIE); document.getElementById("slidecontent").style.height = "600px"; My libraries (Debian Sarge): ii libxml2 2.6.11-3 GNOME XML library ii libxml2-dev 2.6.11-3 Development files for the GNOME XML library ii libxml-libxml-perl 1.56-6 Perl module for using the GNOME libxml2 library ii libxslt1.1 1.1.8-4 XSLT processing library - runtime library ii libxslt1-dev1.1.8-4 XSLT processing library - development kit ii libxml-libxslt-perl 1.53-4 Perl module for using the GNOME libxslt library Package: xsltproc Architecture: i386 Version: 1.1.7-1 Depends: libc6 (>= 2.3.2.ds1-4), libxml2 (>= 2.6.10), libxslt1.1 (>= 1.1.7), zlib1g (>= 1:1.2.1) I then also tried the current versions from cpan w/o change: XML::LibXML: '/usr/local/lib/perl/5.8.3/XML/LibXML.pm', VERSION 1.58 XML::LibXSLT: '/usr/local/lib/perl/5.8.3/XML/LibXSLT.pm', VERSION 1.57 Since xsltproc works correctly, it is probably a problem with the perl interfaces. Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [patch] sawa exception bug
BTW, one should generally also local'ize $@ in any code, at least like in: sub DESTROY { ... local $@; eval { ... }; if ($@) } eval in destructors is particularly nasty, since those without 'local' wipe out $@ without giving you any chance to look at the error (short of abusing $SIG{__DIE__}): sub Foo::DESTROY { eval { } } eval { my $a= bless {},"Foo"; die "Hell is loose"; print "Heaven\n"; }; if ($@) { print "Heaven not achieved: [EMAIL PROTECTED]"; } will print nothing at all. => always, always (*) localize $@ before entering eval, or alternatively localize it in all destructors that use eval directly or might use it indirectly. Christian. (* at least theoretically) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[patch] sawa exception bug
This makes "SAWA::Error=HASH(0xdeadbeaf)" error messages go away: --- SAWA-0.79/lib/SAWA/Machine.pm~ 2004-08-27 13:15:37.0 +0200 +++ SAWA-0.79/lib/SAWA/Machine.pm 2004-09-08 18:24:42.0 +0200 @@ -120,7 +120,8 @@ if ( $@ ) { eval "require $handler;"; if ( $@ ) { -$self->error->die( $@ ); + my $e=$@; +$self->error->die( $e ); return HANDLER_ERROR; } $new_handler = $handler->new(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Announce: O'Reilly's XML Publishing with AxKit
At 1:15 Uhr -0700 22.07.2004, Kip Hampton wrote: GARY Hoffman wrote: Has anyone used AxKit in conjunction with DreamWeaver or GoLive or a similar program with respect to creating dynamic content for an otherwise static site? what we have done for the publishing system used at www.ethlife.ethz.ch is using dreamweaver for editing the *contents*. The html is parsed and converted to xml on uploading (or saving) the html file. Mainly css styles are used by the editors for the text markup. Invalid markup is removed and is generating a warning message popped up to the editor. Except for some bugs still in the system, that works pretty well. Maybe today's client side xml editors provide a good alternative though. Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fwd: [OSCOM] Final Call for Proposals (OSCOM 4 with Apache Tracks)
Date: Wed, 21 Jul 2004 22:45:11 +0200 From: Michael Wechner <[EMAIL PROTECTED]> To: general <[EMAIL PROTECTED]> Subject: [OSCOM] Final Call for Proposals (OSCOM 4 with Apache Tracks) Reply-To: [EMAIL PROTECTED] Dear all This is the final call for proposals for OSCOM 4 with Apache Tracks. The submitted proposals can be viewed at http://www.oscom.org/events/oscom4/proposals/ The deadline was actually some days ago, but because of the nice weather (at least in Zurich) we are bit slow ourselves, so we extend the deadline until tomorrow night Thursday, July 22, 24:00 CET. Thanks Michi -- Michael Wechner Wyona Inc. - Open Source Content Management - Apache Lenya http://www.wyona.com http://cocoon.apache.org/lenya/ [EMAIL PROTECTED][EMAIL PROTECTED] ___ General mailing list [EMAIL PROTECTED] http://oscom.org/cgi-bin/mailman/listinfo/general - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
emacs XSP mode?
Hello Has anyone written or tried writing an xml/perl(|java) multi mode for (gnu/X)emacs, probably using mmm-mode? If not, I'll consider creating one. (I've not really tested mmm-mode much yet, though, so if it turns out being slow or not nice during editing, I'll maybe not do it.) Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
swiss axkit users?
Hello Are there any swiss AxKit users other than me and my buddies? I'm living in Zurich, and would like to meet (or visit) you! :) Cheers Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: xsl:call-template question
ok, Kip explained me everything in irc. (Looks like I'm still an XSLT newbie - not that this would surprise me. But to be fair to myself: it looks like even some article authors haven't understood xsl, like of the one I linked in my mail) Correct is: ... Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
xsl:call-template question
Hello, I can't seem to make passing params to template calls work. Well, maybe I'm even asking for too much: I want to pass not only a string to the template, but a whole tree. Does that work at all? What I want to do is: reuse the "top-level" template (the one outputting the , and head/footer parts) in several other stylesheets that themselves define what's put into the central part of the page (the 'main' part). Thanks for your help, Christian. --- html_allexceptentry.xsl: --- http://www.w3.org/1999/XSL/Transform"; version="1.0"> theaterblut.ch ... . what's the right thing here?: or or what else? --- ordering1.xsl --- http://www.w3.org/1999/XSL/Transform"; version="1.0"> BLA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
1h Time::Piece time shift
Hello 'This the right place for this? use strict; use Time::Piece; my $time=time(); print "time=$time\n"; my $d= Time::Piece->strptime($time,'%s'); my $epoch= $d->epoch; print "epoch=$epoch\n"; print "diff: ".($time-$epoch)."\n"; __END__ time=1068561586 epoch=1068565186 diff: -3600 Why? Same thing for all parsing functions, some localtime value parsed and output via epoch gives a time 1h off. Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with Perform and Netscape 4
At 22:56 Uhr + 05.11.2003, Matt Sergeant wrote: Hmm, PerForm from version 1.8.2 (The PerForm.pm I'm using has $VERSION="1.8.3", and AxKit::XSP::WebUtils $VERSION 1.6) uses a Redirect header, not a Location header. You know what? I've changed the last parameter to AxKit::XSP::WebUtils::redirect from 1 to 0 and now netscape 4.77 works. Thanks for the tip :) What was the reason that you changed to Refresh instead of Location? Have you checked a tcpflow dump of the transaction? (?, have you seen what I've already posted?) Thanks, Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with Perform and Netscape 4
Hello I'm having problems with perform (file upload) and Netscape 4(.77 on macos 9): after hitting "upload", netscape displays "The document containted no data. Try again later, or contact the server administrator"; after clicking "OK", the redirect is executed and the target page displayed as it should. Does Netscape 4 not allow redirect after POST or file uploads? More detail below. Current Perform from cpan. Anyone ever seen this? Thanks, Christian. fotos/upload.xsp: http://apache.org/xsp/core/v1"; xmlns:param="http://axkit.org/NS/xsp/param/v1"; xmlns:f="http://axkit.org/NS/xsp/perform/v1"; xmlns:e="http://axkit.org/NS/xsp/exception/v1"; > sub submit_upload { "/fotos/uploadclose.html" } sub validate_foto { } foto upload form foto upload form Pls choose file: fotos/uploadclose.html: closing window closing window... decoded tcpdump output from a POST without having choosen a file, with netscape 4.77 macos9: netscape: == POST /fotos/upload.html HTTP/1.0 Referer: http://theatest.mine.nu/fotos/upload.html Connection: Keep-Alive User-Agent: Mozilla/4.77 (Macintosh; U; PPC) Host: theatest.mine.nu Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* Accept-Encoding: gzip Accept-Language: en Accept-Charset: iso-8859-1,*,utf-8 Content-type: multipart/form-data; boundary=---24981287017201Content-Length: 466 -24981287017201 Content-Disposition: form-data; name="__submitting_upload" 1 -24981287017201 Content-Disposition: form-data; name="sessionkey" -24981287017201 Content-Disposition: form-data; name="foto"; filename="" -24981287017201 Content-Disposition: form-data; name="upload" upload -24981287017201-- server: === HTTP/1.1 200 OK Date: Wed, 05 Nov 2003 14:44:43 GMT Server: Apache/1.3.26 (Unix) mod_ssl/2.8.9 OpenSSL/0.9.6c mod_deflate/1.0.15 mod_accel/1.0.23 Pragma: no-cache Cache-control: no-cache Refresh: 0; url=http://theatest.mine.nu/fotos/uploadclose.html Content-Type: text/html; charset=iso-8859-1 Expires: Wed, 05 Nov 2003 14:44:43 GMT Connection: close (2 zeilenumbrücke am ende) netscape: = GET /fotos/uploadclose.html HTTP/1.0 Referer: http://theatest.mine.nu/fotos/upload.html Connection: Keep-Alive User-Agent: Mozilla/4.77 (Macintosh; U; PPC) Pragma: no-cache Host: theatest.mine.nu Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* Accept-Encoding: gzip Accept-Language: en Accept-Charset: iso-8859-1,*,utf-8 server: === HTTP/1.1 200 OK Date: Wed, 05 Nov 2003 14:44:47 GMT Server: Apache/1.3.26 (Unix) mod_ssl/2.8.9 OpenSSL/0.9.6c mod_deflate/1.0.15 mod_accel/1.0.23 Last-Modified: Sun, 12 Oct 2003 05:07:15 GMT ETag: "1309a-b9-3f88e183" Accept-Ranges: bytes Content-Length: 185 Content-Type: text/html; charset=iso-8859-1 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive closing window closing window... (end of session) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Perform, and xsl:import puzzles
Hello I'm using AxKit::XSP::PerForm for the first time. - the included perform_html.xsl file is incomplete, it misses the following template: - I have problems with xsl:import. Ok, there are 3 ways using perform_html.xsl: (1) using it directly: cp perform_html.xsl perfhtmlcopy.xsl; remove comment around the default template, and put above file_upload template into perfhtmlcopy.xsl. This works. (2) using an own stylesheet.xsl, and . This works as well. (3) using an own stylesheet.xsl, and . This does not work, the html output looks like the perform_html.xsl would not have been seen at all. No error in the logs, just these debug messages: ... LibXSLT match_uri: /xsl/perform_html.xsl LibXSLT open_content_uri: /xsl/perform_html.xsl Style Provider Override: Apache::AxKit::Provider::File decoding from UTF-8 [req] File Provider given $r: /home/dav/Site1_dev/xsl/perform_html.xsl encoding to UTF-8 [LibXSLT] performing transformation ... So libxslt fetches the xsl:import'ed sheet, but then does just as it has not seen it at all and only applies the templates from the parent sheet. This is my parent sheet: is the default template a problem?: http://www.w3.org/1999/XSL/Transform"; version="1.0"> FFF Thanks for any enlightment christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Provider problems
At 21:38 Uhr +0200 09.10.2003, Christian Jaeger wrote: sub get_styles { my $self=shift; if ($$self{cjfile_media} eq 'html') { $$self{apache}->content_type("text/html"); } my $res= $myowntypemap{ $$self{cjfile_sourcetype} }{$$self{cjfile_media}}; if (!$res) { warn "CJ get_styles: fallback to super, since type/media $$self{cjfile_sourcetype}/$$self{cjfile_media} not found"; $res= $self->SUPER::get_styles; } BTW: I *have* to call $self->SUPER::get_styles for not providing any style at all. Returning [] or undef does not work, throwing an exception neither, the only thing is SUPER::get_styles since that one calls into an XS getstyle function witch seems to work. This looks very strange to me and definitely looks like an unnecessary restriction (bug?). (Using AxKit CVS from a few weeks ago.) Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Provider problems
It seems this mail hasn't made it to the list. Cheers Christian. Date: Tue, 7 Oct 2003 14:45:09 +0200 To: [EMAIL PROTECTED] From: Christian Jaeger <[EMAIL PROTECTED]> Subject: Provider problems Hello I'm having many troubles and unclarities about providers. The attached provider solves this problem: - url's should be mapped to source files with a fallback strategy: if file.html is not found, look for file.xml, if not found, look for .xsp - translations depend on both url suffix and source suffix: .xsp files should always be executed as xsp, .xsp and .xml files should be translated with xsl if requested as .html, and so on. Now there is one problem and one question. - Problem: somehow new requests depend on previous requests. Some state information is preserved between requests. When I request an .xml file as .html, then even subsequent .xml requests yield the .html. In spite of "AxNocache On" in the apache condig, so it doesn't seem like a cache problem (though that's prolly an unsolved problem still). - Question: I'm coding my own typemap in this code. That's since I didn't know how the whole typemap stuff works. Suggestions for a clean mechanims welcome. Thanks, Christian. package Thea::Provider; use strict; use base 'Apache::AxKit::Provider::File'; sub init { my $self=shift; warn "CJ init"; my $rv=$self->SUPER::init(@_); delete $$self{file_exists}; ### gg return $rv; } sub process { my $self = shift; my $xmlfile = $self->{file}; unless ($self->exists()) { AxKit::Debug(5, "file '$xmlfile' does not exist or is not readable"); return 0; } if ($$self{cjfile_sourcetype} eq 'html') { return; # geht!!! } if (!$AxKit::FastHandler) { local $^W; if (($xmlfile =~ /\.xml$/i) || ($xmlfile =~ /\.html$/i)|| ##<-- cj; nötig? ($self->{apache}->content_type() =~ /^(text|application)\/xml/) || $self->{apache}->pnotes('xml_string') ) { return 1; } } else { return 1; } AxKit::Debug(5, "'$xmlfile' not recognised as XML"); return 0; } sub exists { my $self = shift; my $file= $self->{file}; my $uri= $ENV{REQUEST_URI}; $uri=~ s/\?.*//s; my $is_dirindex= substr($uri,-1) eq '/'; if (!$is_dirindex and exists $$self{file_exists}){ return $self->{file_exists} } warn "CJ determine media for '$file'.."; if ($is_dirindex) { $$self{cjfile_media}='html'; warn "CJ: es ist dirindex"; } else { if ( $file=~ /\.html$/) { $$self{cjfile_media}='html'; } else { $$self{cjfile_media}= 'xml'; } } warn "CJ determined media '$$self{cjfile_media}'"; warn "CJ: determine source for '$file'.."; if ($file=~ /\.html$/) { if (-e AxKit::FromUTF8($file)) { $$self{cjfile_sourcetype}='html'; } else { $file=~ s/\.html$/.xml/; goto checkxml; } } elsif ($file=~ /\.xml$/) { checkxml: if (-e AxKit::FromUTF8($file)) { $$self{cjfile_sourcetype}='xml'; } else { $file=~ s/\.xml$/.xsp/; goto checkxsp; } } elsif ($file=~ /\.xsp$/) { checkxsp: if (-e AxKit::FromUTF8($file)) { $$self{cjfile_sourcetype}='xsp'; } else { warn "CJ determine: nothing found"; return; } } else { warn "CJ determine: unknown extension"; return; } warn "CJ: determined source '$$self{cjfile_sourcetype}'"; if (-r _ ) { $self->{file_exists} = 1; $$self{file}=$file; return 1; } else { AxKit::Debug(2, "'$file' not readable"); return; } } my %myowntypemap; $myowntypemap{xsp}{xml}= [{type=> "application/x-xsp", href=>"."}, {type=> "application/x-addparams", href=>"NULL"}, ]; $myowntypemap{xsp}{html}= [{type=> "application/x-xsp", href=>"."}, {type=> "application/x-addparams", href=>"NULL"}, {type=> "text/xsl", href=> "/xsl/htmlview.xsl"}]; $myowntypemap{xml}{xml}= [{type=> "application/x-addparams", href=>"NULL"}, {type=> "text/xsl", href=> "/xsl/flashview.xsl"}, {type=> "application/x-stripwhitespace", href=&g
ptkdb & axkit
Has anyone ever got ptkdb to run under apache/axkit? I spend days about a year ago. Mainly had problem with environment vars being overwritten by apache, thus ugly scripty trying to recreate the env to make tk work but never did. Thanks for any tips Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Berkeley DB XML
At 20:29 Uhr -0700 01.06.2003, Kip Hampton wrote: Basically, it appears that If you follow the "Building Berkeley DBXML for UNIX" doc from the dbxml reference docs to the letter (including versions and build flags) then it should go okay, I guess. This is (basically) what I did (I used the debian unstable version of xerces, and used the path to its build directory). The docs state that xerces >= 2.1.0 is needed, and that they use 2.2.x for testing. Maybe it really needs xerces >= 2.2.x. I'll try as soon as I find time. Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Berkeley DB XML
Hello I've tried to compile it on a debian woody machine with some parts recompiled from debian unstable. I get this warning on configure: ... checking unicode support in flex... configure: WARNING: not found. Pathan requires a version of flex supporting the -U (16-bit unicode) flag if you need to rebuild the lexer or parser. ... and then on make: g++ -c -DUNIX -Wall -ftemplate-depth-50 -O2 -I/DOWNLOADS/sleepycat.com/dbxml-1.0.14/lib/libpathan-1.2/src/patches/Xerces2_1_0/src -I/SRCREBUILD/xerces21-2.1.0/build-tree/xerces-c-src2_1_0/src -I/DOWNLOADS/sleepycat.com/dbxml-1.0.14/lib/libpathan-1.2/src XPathParser.cpp -fPIC -DPIC -o /DOWNLOADS/sleepycat.com/dbxml-1.0.14/lib/libpathan-1.2/objs/.libs/XPathParser.o In file included from ../dataItem/DataItemNodeList.hpp:11, from ../dataItem/DataItemNav.hpp:12, from XPathParser.y:6: ../dataItem/../dataItem/DeadNodeList.hpp:19: parse error before `*' ../dataItem/../dataItem/DeadNodeList.hpp:20: parse error before `*' ... The full messages are avail from http://pflanze.mine.nu/~chris/scratch/sleepycat I've installed flex-2.5.31 but it doesn't know an -U option. Is it related to the compile problem? If yes where to get a unicode savvy flex? Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Segfault-free AxKit/libxml/libxslt combination?
Hello Has anyone found a segfault free combination of libxml/LibXML/libxslt1/LibXSLT(/Axkit) ? I'm currently using the following, on linux x86: - installed from CVS: AxKit: '/usr/local/lib/perl/5.6.1/AxKit.pm', VERSION 1.6_02 # $Id: AxKit.pm,v 1.41 2003/02/07 12:20:47 matts Exp $ - installed from Debian unstable (recompiled on woody): ii libxml2 2.4.28-1cj ii libxml2-dev 2.4.28-1cj ii libxml-libxml-perl 1.52-4cj ii libxml-namespacesup 1.07-3cj ii libxslt11.0.21-0.2cj ii libxslt1-dev1.0.21-0.2cj ii libxml-libxslt-perl 1.52-1cj ..and it segfaults every few requests (randomly; limiting the number of requests per child to 1 does not help either). We are using exslt date-time templates (functions not yet working), and those also seem to like to segfault (consistently) in some situations - especially on a powerpc machine where it looks worse concerning segfaults. Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic ordered inputs for taglibs
At 7:54 Uhr +0100 01.04.2003, Matt Sergeant wrote: On Mon, 31 Mar 2003, Christian Jaeger wrote: It would be cool if one could do something like: > Bleh i.e. declare a list of inputs (with possibly dynamic values), and get those inputs in the same order as func's arguments. Currently we get a syntax error in the TaglibHelper-generated perl code. Only seems to be supported, but that does not allow dynamic values, right? Seems like you want the * param type here. I'll suggest that to my colleague. We want to be able to specify a list of articles, either by selecting one of them by exact name, or by requesting a list of the most recent ones, or by search argument, and so on. And those selections should (at least that's what would be cool) be intermix-able freely. Example (which would return a list of stories (or their xml contents, respecively) like (Somestory, Secondstory, firststoryoftoday, secondstoryoftoday, thirdstoryoftoday, Otherstory)): Somestory-e Secondstory-e Otherstory-e Not sure the above would work though, would maybe have to be: nameSomestory-e name>Secondstory-e sameday_max nameOtherstory-e (Hmm, starts to be wordy) Christian. -- <:->get a SMart net Spam trap - do not mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamic ordered inputs for taglibs
It would be cool if one could do something like: Bleh i.e. declare a list of inputs (with possibly dynamic values), and get those inputs in the same order as func's arguments. Currently we get a syntax error in the TaglibHelper-generated perl code. Only seems to be supported, but that does not allow dynamic values, right? Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Big EXSLT date function and LibXMLSupport problems
At 13:00 Uhr -0500 30.03.2003, S Woodside wrote: I guess I'll say what everyone was telling me just recently -- can you provide a slimmer test case? You're using a ton of different EXSLT extensions, it's hard to see what's going on, and the code is pretty huge in the function.xsl document. The date.format-date.function.xsl is given just for reference, it's straight from the exslt.org website. I think our files give pretty much the simmest test case possible, basically: (in http://pflanze.mine.nu/~chris/axkit/exsltfunc_problem/Datetestfunction.xsl ) Maybe we should just experiment a bit more with the exslt builtins. Looks like we don't understand it yet. (We would still be glad to get a working example of a .xsl sheet that makes use of those functions.) Christian. simon On Sunday, March 30, 2003, at 07:28 AM, Christian Jaeger wrote: Could anyone look at those files and tell us what's wrong? Look at the Date.xml, Datetext.xsl, and machine*/error.txt files at the following location: http://pflanze.mine.nu/~chris/axkit/exsltfunc_problem/?M=A And/or provide us with a full example that works for them? -- www.simonwoodside.com -- 99% Devil, 1% Angel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Big EXSLT date function and LibXMLSupport problems
At 12:55 Uhr -0500 30.03.2003, S Woodside wrote: I can verify that EXSLT works in 1.6.1 since I'm using it. Why are you using CVS instead of the released version? (that's as much a general question as specific to you) The reason is that I wanted to use xincludes that are going through some sort of provider, and have been told that CVS AxKit is containing pieces for that - funny that it's precisely the related LibXMLSupport.pm module that's giving problems with exslt now. I've now put some heavy workaround into LibXMLSupport.pm. We are now getting the same error on CVS AxKit as in 1.6 ("Function XXX not found"). Christian On Sunday, March 30, 2003, at 07:28 AM, Christian Jaeger wrote: For some reason, the current CVS AxKit does *not work at all* with exslt function libs because it looks like the new LibXMLSupport.pm can't load the file because of a bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sloooow xml parsing in a setup with current CVS AxKit - solved
At 14:31 Uhr +0200 30.03.2003, Christian Jaeger wrote: For some reason, it takes 10 seconds to parse a 100k xml string returned from an Taglib function Problem solved: In the .xsp file there was given a stylesheet directive with type application/xsp -> thus the result was parsed as xsp again, which was slow. Surprisingly, the result was still working! It was just slow :) Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
In need for an as_libxmltree output mode in TaglibHelper
We are building XML::LibXML trees inside some Taglibs. I'd like to have those trees attached directly to the output. Instead of an unnecessary ->toString(1) | parse double transform. Any idea/hints to how to implement that? I'm willing to implement it. Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sloooow xml parsing in a setup with current CVS AxKit
For some reason, it takes 10 seconds to parse a 100k xml string returned from an Taglib function with current cvs axkit. This is a 1ghz athlon with 256MB RAM. I've never seen this on our live server running axkit 1.5.2. Any idea? Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Big EXSLT date function and LibXMLSupport problems
Hello We are having a hard time trying to get exslt date functions to work, and have run out of ideas. Could anyone look at those files and tell us what's wrong? Look at the Date.xml, Datetext.xsl, and machine*/error.txt files at the following location: http://pflanze.mine.nu/~chris/axkit/exsltfunc_problem/?M=A And/or provide us with a full example that works for them? For some reason, the current CVS AxKit does *not work at all* with exslt function libs because it looks like the new LibXMLSupport.pm can't load the file because of a bug. Huge thanks in advance Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resistance of TaglibHelper against user errors
At 10:22 Uhr +0100 30.03.2003, Matt Sergeant wrote: The problem is caused by the fact that TLH can't know if a particular tag is a function tag or an attribute/parameter tag. This could probably be handled a lot better than it is right now, it's just a matter of programming after all. OK. Thoughts: - it's still not clear why it should generate code that doesn't compile in this case. (Why doesn't it generate code that does nothing at all? Of course that wouldn't be much better.) - At least upon the closing tag, it should probably be clear.(?) I don't have the time right now to dive into the code. Maybe later. Cheers Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Resistance of TaglibHelper against user errors
Hello We are using TaglibHelper for more than 1.5 years now. It has always been mainly my colleagues who are writing the taglibs, and they have quite many times come to me with a problem they couldn't solve. The problem is then that in most cases the error message was just an error in the generated perl code. It then always takes (for me who didn't write the code :) quite some patience to find out what's wrong. This makes TaglibHelper seem quite fragile. Today my colleague got such an error because he misspelled the taglibfunction definition in his taglib. (See example below). Seems like having a tag in an .xsp file without a corresponding definition in @EXPORT_TAGLIB breaks TaglibHelper. Shouldn't TaglibHelper stop building code right when it encounters a tag that has no definition? Christian. --- Example: Today my colleague got the following error, because he misspelled the taglibfunction definition in this taglib: package LifeCMS::Taglib::navigation; use Apache::AxKit::Language::XSP::TaglibHelper; @ISA = qw/Apache::AxKit::Language::XSP::TaglibHelper/; $NS = 'http://apache.org/xsp/LifeCMS/Taglib/navigation'; @EXPORT_TAGLIB = ( 'navigaton($arg):as_xml=1', ); ## ^^-- typo use strict; sub navigation { warn "!!! called NS navigation\n"; } 1; Error: [Sat Mar 29 21:21:26 2003] [error] [client 129.132.19.123] [AxKit] [Error] Compilation failed: Global symbol "%_args" requires explicit package name at XSP generated by LifeCMS::Taglib::navigation::parse_start line 1. syntax error at XSP generated by LifeCMS::Taglib::navigation::parse_start line 1, near """ # line 1 "XSP generated by LifeCMS::Taglib::navigation::parse_start" $_args" Global symbol "%_args" requires explicit package name at XSP generated by LifeCMS::Taglib::navigation::parse_start line 1. Part of the generated XSP code: 23 __mk_text_node($document, $parent, "" . do { 24 # line 1 "XSP generated by LifeCMS::Taglib::info::parse_start" 25 { my %_args = (); 26 # line 429 "XSP generated by /usr/local/lib/perl/5.6.1/Apache/AxKit/Language/XSP/TaglibHelper.pm" 27 ; Apache::AxKit::Language::XSP::TaglibHelper::handle_result('sectionname()', undef(), 0, $document, $parent, LifeCMS::Taglib::info::sectionname());} 28 }); # non xsp tag 29 30 # line 1 "XSP generated by LifeCMS::Taglib::info::parse_end" 31 $parent = $parent->getParentNode; 32 $parent = __mk_element_node($document, $parent, q|left_column|); 33 34 # line 1 "XSP generated by LifeCMS::Taglib::navigation::parse_start" 35 $_args{navigation} = "" 36 37 # line 1 "XSP generated by LifeCMS::Taglib::navigation::parse_start" 38 $_args{arg} = "" 39 . q|1| 40 # line 1 "XSP generated by LifeCMS::Taglib::navigation::parse_end" 41 ; 42 43 # line 1 "XSP generated by LifeCMS::Taglib::navigation::parse_end" 44 ; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Business] Anyone need AxKit Hosting?
Simply using another apache instance for each client and proxying requests to them from a mod_accel enabled main intance should be enough to provide basic security. Write separate SysV startup scripts for each of them using 'su user' if started as root, and separate configuration files (httpd -f path); each user using another port. mod_accel-enabled main instance proxying to those ports. (Well, you can't really prevent some user from taking over the port of another user if the latter restarts his httpd; this could be a problem. If nothing better, maybe write a setuid-root helper script which is able to identify (netstat/lsof) and kill processes listening on the port belonging to the real user.) Christian At 20:09 Uhr + 05.12.2002, Tom Howe wrote: You could use virtual servers. DVSR do this very successfully. www.dsvr.co.uk. you can sign up for a free trial account I think. You basically get what appears to be your own instance of apache/mysql etc. really cool interface too and great pricing. -Original Message- The only problem I see is it needs to be co-hosted. There's no security with mod_perl - so I can't see a hosting service willing to do shared hosting. However I'm sure you could do it e.g. if you Tod paid for the hosting, but sold off vhosts on the server to clients using code you'd developed, that would work. Matt. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can AxKit::Exception to xml translation be done in OO way?
At 9:44 Uhr -0700 29.06.2002, Daisuke Maki wrote: >? >I would like to use AxErrorStylesheet as my uniform way of displaying >errors in my AxKit application. The thing is, I would like to add more >information to the XML that AxKit hands to the ErrorStylesheet. > >I looked through the code in CVS, and process_error() seems to be >creating a XML string on the fly. But that means that if I want to add >more info in the error XML, I would need to modify my copy of AxKit... I >don't like that :/ > >So, would you guys consider it if I sent a patch where the XML >generation is done in Apache::AxKit::Exception instead of >process_error()? This way I can simply throw a subclass of >Apache::AxKit::Exception when I encounter errors, and use the >ErrorStylesheet to decide what to print out. I've already done something along this line: actually I've separated xml generation out of AxKit, and let AxKit only call ->as_errorxml on the thrown exception and render that. The exception classes then do use a base class that implements this as_errorxml method, which generates the xml. Well I haven't changed how the exceptions thrown by axkit *itself* are handled, just foreign exceptions. I guess it would make sense to make that all more uniform, though, so Apache::AxKit::Exception should ideally probably just be a subclass of the same class with the as_errorxml method. Maybe using multiple inheritance will help. I've promised for a long time to publish the patch, the exception syntax filter and base classes, but didn't because of hard to solve problems in the filter, but I'll make an effort now and do it over this weekend. Christian. -- Christian Jaeger Programmer & System Engineer +41 1 430 45 26 ETHLife CMS Project - www.ethlife.ethz.ch/newcms - www.ethlife.ethz.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OSCOM - Final call for participants
Hello all I'm forwarding this to the AxKit and mod_perl lists - sorry for being that late, hope it's not too late for anyone who wants to participate. I'm thinking about visiting the event myself, if not speaking, but I've already had a talk this March in Zurich (badly prepared and unfinished product, sadly), so it's probably no use for me applying as speaker again unless it's in some form of intercooperation (now that our product is (almost) finished we're open to work together with other interested parties). I'm also wondering who is going to visit the event :) Christian. >Date: Mon, 10 Jun 2002 00:49:46 -0400 >From: Michael Wechner <[EMAIL PROTECTED]> >User-Agent: Mozilla/5.0 (Windows; U; Win95; en-US; rv:0.9.4) >Gecko/20011019 Netscape6/6.2 >X-Accept-Language: en-us >To: [EMAIL PROTECTED] >CC: [EMAIL PROTECTED] >Subject: OSCOM - FINAL CALL > >Dear Friend of OpSoCoMa > >We are still looking for speakers for the > >Second Open Source Content Management Conference >San Francisco, 25 to 27 September 2002 > >If you want to participate please read our Call for Participation > >http://www.oscom.org/conferences/sanfrancisco2002/cfp.html > >Please send your proposal within the next week to [EMAIL PROTECTED] >DEADLINE is Friday June 14. > >Thanks and all the best > >Michael >http://www.oscom.org -- Christian Jaeger Programmer & System Engineer +41 1 430 45 26 ETHLife CMS Project - www.ethlife.ethz.ch/newcms - www.ethlife.ethz.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Segfaults from a different kind
At 6:08 Uhr +0200 02.06.2002, Melvyn Sopacua wrote: >However - I can't get a core dump, and in gdb run -X /path/to/conf doesn't >create a socket somehow. If you start apache as root and let it change userid to nobody (or whatever), most OS's won't drop core dumps because of security considerations (the process could have secret data in it from the period being root). (You *can* work around this in linux by calling prctl(PR_SET_DUMPABLE,1) after the set*uid calls, but you would have to either patch apache or axkit or call XS code from startup.pl.) The alternative is to start apache already as some non-root user, but then you will have to change it's listening ports to >1024. I guess you started gdb as a non-root user and apache couldn't connect to port 80. Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AxKit && Apache 2.0
At 12:02 Uhr +0200 09.05.2002, Jörg Walter wrote: >On Wednesday, 08. May 2002 22:50, Matt Sergeant wrote: > >> One proposal I have for AxKit 2.0 would be to not use mod_perl at all, but >> to customly embed perl. The advantage would be we wouldn't need mod_perl >> any more, and we could customise AxKit so that it's much easier to >> separate from Apache module design (e.g. using CGI). The disadvantage >> being that mod_perl is highly developed, so we might miss out on that. But > > we don't use much of mod_perl, so I'm not too worried about it. What comes to my mind: exception handling. Uncatched perl exceptions thrown in XSP files, custom providers etc. should have a common last catcher (the current error stylesheet mechanism). Without perl at the top, who would do it then?(*) (BTW I'll send a small patch shortly that improves this function of AxKit.pm) >But that will give other problems. Imagine two perl interpreters linked at the >same time - unless mod_perl is compiled as DSO, it will probably crash. I know from some own experience that standard perl doesn't accept multiple interpreters in the same process, regardless whether a shared libperl is used. You have to compile perl with an option to enable multiple interpreters (something in the same direction as multithreading) and then explicitely create a new interpreter and switch contexts as described in perlembed. But I don't know whether you would need a separate interpreter anyway, why not load the custom stuff into the same? (apart from my above concern) Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ANNOUNCE: AxKit 1.5
Happy new year :) christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]