Re: AxKit::XSP::WebUtils::redirect causing (many) warnings in error_log

2007-11-26 Thread Lars Skjærlund
Hi Martijn,

 And if not (they're just warnings after all), how to
 stop them from clogging the error log file. (They occur, even though
 I've set Apache's LogLevel to 'error' - though if this is really the
 problem, I'd probably need to go and ask on the mod_perl or Apache
 list.)

Try AxDebugLevel instead. ;-)

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Params in XSP

2007-09-28 Thread Lars Skjærlund
Hi list,

Would anyone happen to know how to access POSTed paramaters from within
an XSP page in AxKit2?

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Re: Ax2 file handling

2007-05-23 Thread Lars Skjærlund
Hi John,

 Have a look at hook_xmlresponse.
 That's where I do most of my processing.
 Call a method from there that opens the file and extracts the xml. 
 Quite how you would pass xml to an xslt tho is beyond me.

Oh, I can show you that - the above is exactly what I'm doing
already... ;-)

My plugin presently does the following:

If you ask for a simple ODT file like 'index.odt', it will open it,
extract 'content.xml', and pass it on for further processing. 'Further
processing' means calling the XSLT engine to transform the document, and
the result is returned to the browser. This works.

If you ask for something like 'index.odt/Pictures/logo.jpg', it will
open the ODT, extract the image, and pass it on to the browser without
further processing. This works as well.

In both circumstances I have a caching system in place as well -
meaning that the files are extracted only once - until the ODT is
updated, of course.

But when I try to access an ODT from within an XSLT stylesheet, it
breaks:

With Ax1, the above solution was implemented as several modules. One of
these modules had the sole purpose of grapping an ODT file, extracting
the requested content, and pass it on. When I asked for an ODT from
within an XSLT stylesheet like

xsl:apply-templates
select=document('/contact.odt')/office:document-content/office:body/office:text/*/

the request from the XSLT engine for the document was passed on to Ax1
which would again recognize the ODT file, pass it to my plugin, and let
me extract 'content.xml'. Works like a charm.

However, when I try to do the same with Ax2, it seems like the XSLT
engine is trying to fetch the ODT file directly from the file system; at
least the debug messages complains that the file starts with 'PK'
instead of ''. 'PK' is the signature that starts all zip-files
(Remember PKZip?) which is a strong indication that the XSLT engine is
receiving the file in uncompressed, hence unprocessed, form.

How do I make the XSLT engine fetch it's files from Ax2 like it did in
Ax1?

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Ax2 file handling

2007-05-22 Thread Lars Skjærlund
Hi list,

With Ax1, things were a bit more modularized than with Ax2 - at least
it seems so to me.

I had created an Ax1 module that could extract the 'content.xml' from
an OpenDocument .odt file - which is really just a zip-file wrapper
around a collection of datafiles. It worked so well that I could call
the document() function in an XSLT stylesheet, passing the name of an
odt-file as the reference, and Ax1 would let my plugin extract
'content.xml' and pass it on to the XSLT processor.

Unfortunately, this is not the case with Ax2 - at least to my
understanding: When I pass an .odt file to the document() function, the
XSLT processor will pick it up unprocessed, of course complaining that
it doesn't know how to handle the compressed archive.

Is there any correct way of solving this - maybe creating another
plugin? I really cannot figure out the flow of data through the plugin
system, I'm afraid.

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Re: Passing data between plugins

2007-02-08 Thread Lars Skjærlund
Hi Matt,

 It appears $self-client-notes only works within a single plugin,
not
 between two different plugins :-(

 It only works within the same request - are you trying to pass data 

 between multiple requests?

No, I understand that, and it's exactly what I want.

Here's what I'm trying to do: I want to create a generic plugin for
session control. As of my thinking, that should hook the system very
early in the process, even before authentication, etc. So I hook
post_read_request - which, to my regret cannot write cookies so I need
another plugin to update the session cookie - and I then try to pass
userinformation on to the following plugins - like
$self-client-notes('user_id', $user_id).

It works within a plugin in a hook like xmlresponse, but the variable
is empty when I initialize it from my session plugin.

Could it be that notes are read-only in post_read_request - and, if so,
for what reason?

Actually, I would like to pass a bunch of information from my session
plugin to later stages - are notes the best tool for that, or could I
pass, say, a hash in some way?

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Re: Axkit2 and Apache fop?

2007-01-31 Thread Lars Skjærlund
Hi,

 Another point: Alternatively you could do what MailChannels do - talk
to 
 a mod_perl server to do slow stuff. I find that's probably a rather

 complicated way to do things, but I guess it works for them.

That's exactly what I do as well ;-)

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Ax2 request object?

2007-01-18 Thread Lars Skjærlund
Hi Matt,

 However, I need access to what used to be the Apache request object
-
 ie., I need access to cookies, parameters, etc.

 How do you do that within an Ax2-Perl module-TaglibHelper based
 module?

 Hmm, looking at this the AxKit1 way used to be access via the global 

 Apache-request object, right?

No, I used a package called AxKit::Apache - which happens to be a
resident of a rather wellknown module called AxKit.pm ;-)

Like this:

my $r = AxKit::Apache-request();

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Re: Axkit2 wiki

2007-01-17 Thread Lars Skjærlund
Hi list,

I've finally started writing taglibs - they're written as Perl modules.
However, I need access to what used to be the Apache request object -
ie., I need access to cookies, parameters, etc.

How do you do that within an Ax2-Perl-TaglibHelper based module?

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Re: AxKit2: passing params to a stylesheet

2007-01-15 Thread Lars Skjærlund
Hi John,

 What's the syntax for passing param(s) to a stylesheet?

Try $processor-transform(XSLT($stylesheet, %parms))

That's actually (almost) documented in the very bottom of the
AxKit2::Processor POD.

 How does one reference the params in the stylesheet?

Define them as global parameters in your stylesheet. The values will be
initialized by the parms you pass in:

xsl:param name=my_parm/

Then reference it like any other value/parameter with $my_parm.

Yeah, an example in the documentation would be a nice touch ;-)

Regards,
Lars


-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Re: Ax2 taglibs

2007-01-11 Thread Lars Skjærlund
Hi Matt,

 That makes me wonder if the code to load the taglib won't accept a
 fullblown Perl module?

 Ah, it was a bug. Fixed in SVN trunk now.

Yep, that did the trick.

Thank you for preserving my sanity ;-)

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Ax2 taglibs

2007-01-10 Thread Lars Skjærlund
Hi list,

Have spent the whole day trying to fight this:

How do you create, install, and load an XSP taglib, written as a Perl
module?

I've created a simple module like this:

package Sporskiftet::XSP::Statistics;

use AxKit2::XSP::TaglibHelper;

@ISA = qw( AxKit2::XSP::TaglibHelper );
$NS  = 'http://sporskiftet.dk/perl/xsp/statistics';

@EXPORT_TAGLIB = (
'test($text):as_xml=1', 
);

sub test {
my $text = shift;
return pagetitle$text/title/page;
}

1;

- and I've then spent the whole day trying to figure out where to put
this module in order for Ax2 to find it; but it invariably complains

Module cannot be loaded: Can't locate Sporskiftet::XSP::Statistics in
@INC (@INC contains: lib /mnt/hgfs
/usr/lib/perl5/5.8.8/i586-linux-thread-multi /usr/lib/perl5/5.8.8
/usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at
lib/AxKit2/Config.pm line 1264, $fh line 47. in configuration file
'./etc/axkit.conf' line 47

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Re: Ax2 taglibs

2007-01-10 Thread Lars Skjærlund
Hi Matt,

 How do you create, install, and load an XSP taglib, written as a
Perl
 module?

 Generally the same way you do any other perl module. Start with:
 
h2xs -A -X -n Sporskiftet::XSP::Statistics

Oh, I'm sorry I wasn't clear enough: How do you install it in AxKit2?

I included the code for my sample module - a module like this is very
easy to load in Ax1, but it appears Ax2 won't accept it.

There should be no need to build and make the module as long as it's
pure Perl code. Furthermore, I'm quite sure I had it working once with
an earlier Ax2 version, but with the latest CVS it appears to be
broken.

Ax2 consistenly complains it cannot find it: Ordinarily, I have my
modules in a special directory ('/mnt/hgfs/...') that is created by
VMware and allows my to access it from outside the virtual machine. I've
included that path in PERL5INC, but it doesn't work with the current
CVS. I've then tried moving the module to the Ax2 directory structure,
it doesn't find it, and I've tried moving it to the ordinary Perl
structure ('/usr/lib/perl5/site_perl/5.8.8') - it still won't find it.

That makes me wonder if the code to load the taglib won't accept a
fullblown Perl module?

The trick with the VMware special directory works fine with ordinary
Ax2 modules - but not the taglib?

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Re: uri_to_file

2006-09-24 Thread Lars Skjærlund
Hi Jörg,

 What I meant with cannot be solved was that it appeared that you
did
 not want to solve it.

 While I don't exactly recall the issue you mention, be aware that we
don't 
 ignore your feedback. IIRC, Matt explicitly said that we should
modify 
 uri_to_file to follow Apache's behaviour. It was just not done yet,
since 
 like most open source projects, it is done in spare time.

I understand that - and I'm full of respect for all of you making such
splendid products.

However, I might have misunderstood you: When I complained that
DirectoryIndex would only take a single parameter - and that I needed
more - you answered in two ways: By adding an error message stating that
you cannot have more than one parameter, and by telling me that I should
use typeless_uri instead. You also assured me that the latter would
solve my problem.

But it won't: First of all, I want to use .odt files for ordinary
webcontent, and your typeless_uri doesn't allow for that. I could modify
it, of course, but then we're back to the old story. But at the same
time, simply adding .odt as an extension on your list still wouldn't
solve my basic problem, as I would like to be able to add an arbitrary
number of extensions for different fileformats - and the crucial problem
for me would be that I sometimes need tight control over the order that
extensions are checked.

An example: When upgrading a website from pure HTML to XML and
OpenDoc files, I might in the beginning want an index order of
'index.html index.odt' to let the customer experiment with the new
layout by specifying an explicit path, whereelse ordinary users still
see the old pages. At a later stage, I might swap the order to let all
users benefit from the new OpenDoc files when they exist and otherwise
see the old HTML pages.

Apache has worked like this for years, you have the choice and the
flexibility to do so if you please, but it appeared to me that your
message was: No, either you use a single index file, or otherwise use
typeless URIs. Whilst I can follow and sympathise with the latter, it
isn't always possible in the real world, and I want the flexibility to
choose the solution I want ;-).

 The idea is that plugins are small enough so that it won't hurt you
if you 
 use different/older code:

Correct. But neither would I benefit from updates to said code - should
it ever happen. And I think there is room for improvement - among other
things I want to add support for the HTTP ETag for better caching
support. Yes, I _am_ very cache aware - my environment needs it badly
;-)

 And the changed line? I tried setting the last modified header in
my
 plugin, however, serve_file insisted on loading the mtime from the
temp
 file and overwrite the value I supplied. The result beeing, of
course,
 that browsers would reload the pictures all the time as the temp
file
 would always have a new mtime.

 I'm quite interested in what you did, maybe the patch is generic
enough 
 to be included in the next version?

my $mtime = $client-headers_out-header(Last-Modified) ?
$client-headers_out-header(Last-Modified) :
http_date((stat(_))[9]);

In that way serve_file respects the attribute if it has been set
explicitly by a plugin earlier up the foodchain.

 Where exactly? What questions did occur to you, [...]

Try looking at my earlier mails to this list ;-)

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Re: uri_to_file

2006-09-24 Thread Lars Skjærlund
Hi Matt,

 To help with this what I'll do is make it easier to subclass a  
 plugin. This should allow you to fix some functionality in a plugin 

 but still benefit from updates to the core plugin. Does that sound  
 better than the current situation?

Absolutely - that's more along the the line I hoped for.

 I'm glad you tried it, but if these weaknesses are too much for 
 your development to handle then you should probably go back to  
 AxKit1.

I'd love to - but Ax1 is becomming more and more of a problem as it
requires Apache 1.x.

Newer Linux distributions only includes Apache 2.x, and requiring an
average user to build Apache and mod_perl by hand is much too much ;-)
It's acceptable when it's included with the distribution and can be
installed with a few mouseclicks, but by hand? No way...

It's also difficult to explain to potential customers why a brand new
product is built on top of such ancient software :-(

 Note though that AxKit1 is end-of-life now. There will be 1 more 
 update to AxKit1 (to fix libxml2 support) and that will probably  
 be it - but lack of updates is more because it is stable, not because
 
 we don't want to fix bugs :-)

I absolutely second that!

 As Jörg said - please be specific about where the docs are weak as  
 that can be fixed fairly easily. Presumably more tutorials are  
 needed, but it's hard to know what people will want tutored on.

When I get some more time I'll volunteer to write some docs myself;
right now I have a deadline of October 1st to demonstrate as much VDMS
as possible - and it will be running on top of AxKit2.

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Re: uri_to_file

2006-09-23 Thread Lars Skjærlund
Hi Jörg (et all),

 You should have a look at plugins/typeless_uri. Typeless URIs are a
Good 
 Thing(tm), and they solve your DirectoryIndex problem as well.

I've now spent a few days thinking and looking at your latest SVN
code.

Well, it appears that my problem cannot be solved - you've added an
error message now stating that I cannot do what I want, and
unfortunately typeless_uri doesn't solve my problem as well.

So a few questions remain:

* Are the plugins included with AxKit2 meant as examples only to be
modified by the end user, or are they intended as end-user code? If I
modify a plugin, won't the modifications be overwritten by later
updates?

* I've now started writing my own modules that replace the default
plugins. Unfortunately, I cannot find a way to let my plugins coexist
with the default plugins. Is this a good thing?

* Or would I be better of choosing another server? I surely miss the
flexibility of AxKit1 I'm sorry to say.

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Re: uri_to_file

2006-09-23 Thread Lars Skjærlund
Hi Matt,

 Well, it appears that my problem cannot be solved - you've added an
 error message now stating that I cannot do what I want, and
 unfortunately typeless_uri doesn't solve my problem as well.

 Nothing cannot be solved - it's just software, and it seems you've

 uncovered a bug in uri_to_file that needs fixed anyway.

What I meant with cannot be solved was that it appeared that you did
not want to solve it.

Of course (almost) anything can be done as long as we're talking about
software.

 * Are the plugins included with AxKit2 meant as examples only to be
 modified by the end user, or are they intended as end-user code? If
I
 modify a plugin, won't the modifications be overwritten by later
 updates?

 It's a bit of both. I suggest if you're modifying then first copy 
 somewhere else and set PluginDir to the new path, or rename the
plugin 
 - the names don't mean anything.

I'm fully aware of that. However, following this advice would mean that
next time you update some central parts of Ax2, me as well as my users
would miss that update as we're using the non-default plugin. Of course
I could just update my code as well - I probably will - but it still
means developing in two branches for essentially the same
functionality.

Today I created a new module based on serve_file. Except for the usual
red tape, it was a simple copy-paste of the original Ax code - and I
then changed a single line of code. However, that single line gave an
amazing perfomance boost to especially Firefox users: It appears that
Firefox checks the validity of all pictures on every reload, and as the
'Not-Modified' system didn't work, it would reload every picture every
time you returned to a recently visited page. Opera and Internet
Explorer didn't seem to have the same problem.

And the changed line? I tried setting the last modified header in my
plugin, however, serve_file insisted on loading the mtime from the temp
file and overwrite the value I supplied. The result beeing, of course,
that browsers would reload the pictures all the time as the temp file
would always have a new mtime.

I also gave up asking you to change it as I expected an answer along
the lines that 'AxKit performs so well that you don't need caching'.

 * I've now started writing my own modules that replace the default
 plugins. Unfortunately, I cannot find a way to let my plugins
coexist
 with the default plugins. Is this a good thing?

 I don't understand why not. Rename or set PluginDir to a new path.
Hmm, 
 thinking about it there may be another bug there if you have two 
 different plugins called uri_to_file because the compiler doesn't add

 the PluginDir to the generated name. That's a bug but an easy one to

 fix.

When I replace modules like uri_to_file and serve_file, I think I
replace so central parts of AxKit that I may be starting a new
development branch - and I don't want that to happen. However, the VDMS
software I'm working at won't work without my modifications - and you
cannot have two uri_to_file and two serve_file plugins working as
default at the same time.

 You're being a big help in finding the areas of weakness of AxKit2,
but 
 you have to weigh that against the fact that you're not playing - 
 you're trying to build something real.

Is that to be understood like AxKit2 is simply a playground to try new
ideas? Whilst I respect that, it's definately not what I need right
now...

 Ultimately I think AxKit2 will be an easier deployment for your
needs, 
 but maybe you didn't have any issues with mod_perl that way.

I think the very hardest thing about AxKit1 was the lack of
documentation. It wasn't until I got hold of Kip's book that I realized
the full potential - and I had been using it for a long time then. I
think the very hardest thing about AxKit2 is the lack of
documentation...

No, I love mod_perl and use it regularly to create the most weird apps
you might imagine ;-)

On the positive side: On Friday we had a meeting with the head of
development at Ricoh in Japan - he's responsible for around 2,000
programmers - and he had never heard about AxKit before. Now he has -
and he was quite interested.

And I've brought my first Ax2 site online:
http://www.skjaerlund.dk/sofus is my sons website, and it's created
entirely using OpenOffice. It even performs well now - after my
modifications ;-).

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



uri_to_file

2006-09-20 Thread Lars Skjærlund
Hi all,

Playing around again, I fell over some other bits whose behaviour I
didn't like.

If you have a DirIndex like 'index.odt index.html', uri_to_file only
reads the first value. My patch makes it multivalued like with Apache
and most other webservers I know of.

And then my patch modifies $hd-request_uri to include the directory
file, if found; this is the behaviour of Apache and hence, AxKit1 - and
I miss that functionality a lot.

The coding is quick and dirty, making the program rather difficult to
read: If nobody else wants to, I'll rewrite the entire plugin one day to
something a little more readable ;-).

Here's my patch:

56,57c56,57
 my ($self, $config, $value) = @_;
 $config-notes($self-plugin_name.'::dirindex',$value);
---
 my ($self, $config, @value) = @_;
 $config-notes($self-plugin_name.'::dirindex',@value);
81a82
 my $dirindex;
85,86c86,93
 push @path, $self-config('dirindex')
 if (defined $self-config('dirindex')  -f
catpath($volume,catdir(@path),$self-config('dirindex')));
---
   my @dirindex = $self-config('dirindex');
   foreach my $index (@dirindex) {
   if (-f catpath($volume,catdir(@path),$index)) {
   push @path, $index;
   $dirindex = $index;
   last;
   }
   }
98a106

101a110
 $hd-request_uri($hd-request_uri . $dirindex) if $dirindex;

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Serving files

2006-09-19 Thread Lars Skjærlund
Hi Matt,

 How are you doing the temp file creation here?

I was using IO::File :-(

   my ($fh, $filename) = tempfile();
   print $fh $data;
   $self-client-headers_in-filename($filename);
   $self-client-notes('to_unlink', $filename);
   return DECLINED;

Yupp! It works!

When my plugin is finished, I'll write an appnote detailing what was
done, how it was done, and not least why it was done that way. Promise.

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Caching

2006-09-19 Thread Lars Skjærlund
Hi all,

After having complaint a lot, I want to be a little positive: I like
the new way of handling caching a lot. I need caching badly for my
plugins, and I think it's intuitively right the way it's handled in Ax2
;-).

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: FATAL PLUGIN ERROR

2006-09-18 Thread Lars Skjærlund
Hi Matt,

 I've now performed a series of tests, and XML::Simple works
perfectly
 well - except when executed within the Ax2 environment :-(

 That really is bizarre. Well a work around is to set:
 
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
 
 To get the non-SAX behaviour back

Yep, that did the trick. I'll try to do some debugging at a later
stage, but right now I'm concentrating on getting my plugin to work
basically ;-).

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Serving files

2006-09-18 Thread Lars Skjærlund
Hi Jörg,

 Can you try modifying the open call to use the three-argument form,

 i.e open($fh,'',$filename)? Another check would be to see if
$filename is 
 still a reference (print the value of ref($filename), it should 
 be SCALAR.

That helped a little - now it's the stat that fails:

10.0.16.50:4577 L6 serve_file response Serving file: SCALAR(0x8ff6cb8)
stat() on unopened filehandle $fh at ./plugins/serve_file line 63.

Commenting out the stat() gets rid of the error, of course - but it
still doesn't work as so much of the following code depends on the
result of the stat(). CAN you stat() a scalar anyway?

Would it be better if I implemented my own code?

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Serving files

2006-09-17 Thread Lars Skjærlund
Hi Jörg,

 Actually not -- according to 'perldoc -f open', passing a reference
to a 
 scalar instead of a file name will make perl = 5.8.0 read data from
that 
 scalar. $hd-filename(\$content) might do the trick.

I've now done a little further testing:

* My data seems to be OK - I've tried dumping my variable to a file,
and that reveals a nice .png as expected.

* But passing it on as you suggested, $hd-filename(\$document),
serve_file won't open it. I've added several LOGDEBUGs to serve_file,
and it is the open that fails.

* It does see the file, though, the standard logmessage says:

10.0.16.50:1314 L6 serve_file response Serving file: SCALAR(0x8ff10b0)

* I'm running Perl 5.8.8

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Serving files

2006-09-17 Thread Lars Skjærlund
Hi Jörg,

 Actually not -- according to 'perldoc -f open', passing a reference
to a 
 scalar instead of a file name will make perl = 5.8.0 read data from
that 
 scalar. $hd-filename(\$content) might do the trick.

Well, it didn't work right away.

But it's pretty late here in Denmark, so I'm of to bed. Back to work
tomorrow.

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com 


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



Re: Serving files

2006-09-16 Thread Lars Skjærlund
Hi Jörg,

 Do I need to reinvent the wheel, or is there some way that my
plugin
 can pass the file to the serve_file plugin? The file only exists as
a
 temporary file and/or a cached file. I can of course leave the
temporary
 file intact and modify the header, but how do I tell serve_file to
clean
 up then?
 
 Modifying $self-client-headers_in-filename is the way to go. You
can clean 
 up in hook_response_sent. See perldoc lib/Axkit2/Plugin.pm for a list
of 
 available hooks

Unfortunately, it doesn't seem to be that easy :-(

I've tried a lot of combinations, but it seems I invariably run into
the same basic problem: In my situation, I'll quite often have some data
that should be served like an ordinary file. However, it isn't an
ordinary file - sometimes it's a temporary file, at other times it's a
memory image. The first is the case when I unzip a file from an
OpenDocument archive, as example, the later would be the case if I fetch
a file from cachecache.

Temporary files are implicitly closed when 'you launch another program
from within your script', to quote the Camel Book - and with the plugin
architecture of Ax2, this seems to be the case. So even though I've
tried modifying server_file to accept a filehandle instead of a
filename, the filehandle of my temporary file is closed when it reaches
server_file.

And handing a memory image to server_file means even heavier
modification.

Changing server_file to a Perl module might solve the first problem -
calling a module wouldn't count as an external program. But anyway, I
don't think it's for me to decide how to handle this, though I would
like to participate in finding the solution, of course. I think it would
be a shame if I had to invent my own handling of MIME types, serving
files, etc.

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Request URI

2006-09-16 Thread Lars Skjærlund
Hi list,

I've discovered an abnormal behaviour in Ax2: In most respects,
uri_to_file does it work. However, in the case of a dirindex file
beeing called, $hd-request_uri isn't set to the resolved filename, it's
left at the original request format.

Example: In my present case, my 'dirindex' file is 'index.odt'. When
you call, say, http://axkit:8000/sofus/, $hd-request_uri is left at
'/sofus/', it isn't changed to the resolved filename '/sofus/index.odt'.
The latter is the case with mod_perl and Ax1 - so is this strange
behaviour with Ax2 done on purpose?

I really need the resolved URI a lot of places in my XSLT code to
calculate links etc. I could easily write my own code to bypass the Ax2
headers, but it seems to me that this wouldn't be the correct behaviour?
;-)

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Request URI

2006-09-16 Thread Lars Skjærlund
Hi Matt,

 I've discovered an abnormal behaviour in Ax2: In most respects,
 uri_to_file does it work. However, in the case of a dirindex file
 beeing called, $hd-request_uri isn't set to the resolved filename,
it's
 left at the original request format.
 
 Example: In my present case, my 'dirindex' file is 'index.odt'.
When
 you call, say, http://axkit:8000/sofus/, $hd-request_uri is left
at
 '/sofus/', it isn't changed to the resolved filename
'/sofus/index.odt'.
 The latter is the case with mod_perl and Ax1 - so is this strange
 behaviour with Ax2 done on purpose?

 No, if that's what apache does we should copy it.

I think it is - but I'll doublecheck.

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



FATAL PLUGIN ERROR

2006-09-16 Thread Lars Skjærlund
Hi list,

I'm trying to use XML::Simple in a plugin, but when I do, I get a fatal
error.

A test plugin like this:

#!/usr/bin/perl -w

use strict;

use XML::Simple;

sub hook_xmlresponse {
my ($self, $processor, $hd) = @_;

my $fh;
open($fh, '/mmt/hgfs/VDMS/test.pl');
my $meta = XMLin($fh);
close($fh);

return DECLINED;
}

produces an error like:

10.0.16.50:1235 L3 FATAL PLUGIN ERROR: Can't locate object method new
via package XML::LibXML::SAX at
/usr/lib/perl5/site_perl/5.8.8/XML/SAX/ParserFactory.pm line 43.

How come?

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: FATAL PLUGIN ERROR

2006-09-16 Thread Lars Skjærlund
Hi Matt,

 10.0.16.50:1235 L3 FATAL PLUGIN ERROR: Can't locate object method
new
 via package XML::LibXML::SAX at
 /usr/lib/perl5/site_perl/5.8.8/XML/SAX/ParserFactory.pm line 43.

 XML::Simple uses SAX if it's available. Perhaps you have a bug in
your 
 ParserDetails.ini file?

I don't know - it looks pretty normal to me:

[XML::SAX::PurePerl]
http://xml.org/sax/features/namespaces = 1

[XML::LibXML::SAX::Parser]
http://xml.org/sax/features/namespaces = 1

[XML::LibXML::SAX]
http://xml.org/sax/features/namespaces = 1

This is exactly the same content as on other machines where it works
(with AxKit1, that is ;-) ).

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Serving files

2006-09-16 Thread Lars Skjærlund
Hi Jörg,

 Temporary files are implicitly closed when 'you launch another
program
 from within your script', to quote the Camel Book - and with the
plugin
 architecture of Ax2, this seems to be the case. So even though I've
 tried modifying server_file to accept a filehandle instead of a
 filename, the filehandle of my temporary file is closed when it
reaches
 server_file.

 AxKit2 doesn't call any external processes. Plugins _are_ plain perl

 modules, with a regular package nanme and everything -- we just hide

 the verbosity from you. There must be a different reason why you see
 that behaviour.

That sounds reliefing. Well, I'll have to do further investigation
then.

 And handing a memory image to server_file means even heavier
 modification.

 Actually not -- according to 'perldoc -f open', passing a reference
to a 
 scalar instead of a file name will make perl = 5.8.0 read data from
that 
 scalar. $hd-filename(\$content) might do the trick.

I'll try that right away - and appologize for not beeing such a Perl
guru as you folks ;-)

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Serving files

2006-09-15 Thread Lars Skjærlund
Hi everybody,

Struggling to learn the logic of Ax2, I want to do the following:

In order to serve images in OpenDocument files, I'm writing a plugin
that will extract the image file from the .odt file (which is simply a
zip archive, for those who don't know). This file should then be sent to
the browser as a plain file.

Do I need to reinvent the wheel, or is there some way that my plugin
can pass the file to the serve_file plugin? The file only exists as a
temporary file and/or a cached file. I can of course leave the temporary
file intact and modify the header, but how do I tell serve_file to clean
up then?

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Serving files

2006-09-15 Thread Lars Skjærlund
Hi Jörg,

 Modifying $self-client-headers_in-filename is the way to go. You
can clean 
 up in hook_response_sent. See perldoc lib/Axkit2/Plugin.pm for a list
of 
 available hooks

Of course ;-).

Thanks a lot.

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com 


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



Passing parameters

2006-09-15 Thread Lars Skjærlund
Hi again,

Now for the next question:

With Ax1, I could pass parameters from Perl code to the XSLT processor
and use them in my stylesheets by setting these in the Apache request
object - something like:

my $cgi = Apache::Request-instance($r);
$cgi-parms-set('od.request.uri' = $uri);

With Ax2, I hoped the same would be possible like

$hd-add_param('od.request.uri', $uri);

but this doesn't seem to be the case. How do I pass parameters from
Perl code to the XSLT processor?

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Providers?

2006-09-14 Thread Lars Skjærlund
Hi Matt,

 I'm trying to work my way through the new AxKit2 code - but before
I
 figure it out myself, maybe someone would be kind enough to help
me:
 Where's the equivalent of an AxKit1 Provider?

 We were thinking of whether we should do a hook for this, but instead
we 
 made is so crazy simple we felt a new hook wasn't required. Here's
the 
 equivalent of a provider:
 
 sub hook_xmlresponse {
my ($self, $processor) = @_;
 
# generate xml - either an XML::LibXML DOM, or a string
my $xml = generate_xml();
$processor-input($xml);
return DECLINED;
 }
 
 I feel that's MUCH better than the AxKit1 model, don't you

Oh, yes, if we can make it work that simple, it surely is; but
unfortunately, I cannot make it work :-(

Here's my code:

sub hook_xmlresponse {
  my ($self, $processor, $hd) = @_;
  
  my $filename = $hd-filename;
  $self-log(LOGDEBUG, Requested file: $filename);
  
  if ($filename =~ /\.odt$/) {
my $zip = Archive::Zip-new();
if ($zip-read($filename) != AZ_OK) {
  $self-log(LOGDEBUG, 'Corrupted .odt file');
  return BAD_REQUEST;
}

my $fh;
my $member;
my $path_info = $hd-path_info;
$path_info =~ s|^/||;

if ($path_info) {
  $self-log(LOGDEBUG, Handling path: $path_info);
  $member = $zip-memberNamed($path_info);
  # TODO: This is yet unhandled
} else {
  $member = $zip-memberNamed('content.xml') ||
$zip-memberNamed('Content.xml');
}
$fh = IO::File-new_tmpfile;
$member-extractToFileHandle($fh);
seek($fh, 0, 0);

my $document;
while ($fh) {
  $document .= $_;
}
undef $fh;

$processor-input($document);
  
#my $stylesheet = '/mnt/hgfs/VDMS/opendoc.xsl';
#my $out = $processor-transform(XSLT($stylesheet));
#return OK, $out;

return DECLINED;
  } else {
return DECLINED;
  }
}

As you can see, I've tried to handle it directly in my routine, but
I've also tried to do it the way you recommended (with a proper change
of axkit.conf, of course).

No matter what, I get the same error:

10.0.16.50:3220 L3 FATAL PLUGIN ERROR: Entity: line 1: parser error :
Document is empty
PK
^

10.0.16.50:3220 L7 error_xml error Turning error into XML
10.0.16.50:3220 L3 FATAL PLUGIN ERROR: :4: parser error : internal
error
PK
  ^
:4: parser error : Extra content at the end of the document
PK
  ^

That PK looks a lot like the beginning of the zipped .odt file (Phil
Katz and PKZip still isn't forgotten...), not the unzipped XML file I
retrieved above; my $document variable does hold the entire document
(I've dumped it to the debug screen), but for some reason the XSLT
processor still seems to read the zipped file, not the document I try to
pass on?

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Providers?

2006-09-14 Thread Lars Skjærlund
Hi Jörg,

 I'd also say that you are reading the zip file instead. Try to leave
out 
 the seek($fh,0,0), maybe that messes it up.

Well, it certainly did change things: Now I really have an empty
document ;-). So I cannot avoid the seek command.

 You can also use plugins/demo/moewiki as a base for your plugin, it
is a 
 small  and working example for various techniques and can serve as 
 boilerplate code.

I'll dive into it.

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com 


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



Re: Providers?

2006-09-14 Thread Lars Skjærlund
Hi Matt,

 As you can see, I've tried to handle it directly in my routine, but
 I've also tried to do it the way you recommended (with a proper
change
 of axkit.conf, of course).

 Have you printed/logged what's in $document?

Yep - it _does_ contain the content of context.xml.

But it appears that when it reaches the dom subroutine of Processor.pm,
$self-{input} is empty and the routine chooses to read the filename
from $self-{path} instead of reading the string I'm trying to pass on.

I'm afraid I'm not good enough at Perl to explain why that happens
:-(.

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Dynamic configuration

2006-09-14 Thread Lars Skjærlund
Hi list,

As my last encounters have shown, I'm working on a plugin to handle
OpenDocument files. I hope this might be useful to a lot more people
than just us, and I will contribute it in some way when it's finished.
We do plan to register with CPAN to make our modules available that way,
but before that someone might want to see our really-useful plugin - so
how do I share it?

Which brings me on to the real subject - as I wrote, we plan to create
modules, a lot of modules. Actually, we want a plugin for every
fileformat that our virtual DMS is going to handle. We also plan to
contribute all those modules.

But working with a lot of modules might mean restarting AxKit very
often and that might not be practical in a production environment: Would
it be possible to add some kind of dynamic configuration to AxKit?

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Dynamic configuration

2006-09-14 Thread Lars Skjærlund
Hi Jörg,

 Perhaps you can write some more about your idea, since I don't yet
exactly 
 know what you have in mind. But I am sure it is quite easy for any
variant 
 of dynamic loading I can think of.

We're working on a virtual DMS based on AxKit - you can read more about
it on http://www.vdms-project.org though I haven't had the time to
finish it yet.

What we want to do is creating a system that will support a lot of file
formats - some very real, some very virtual: An example of the first
kind could be OpenDocument which I'm working at right now, an example of
the last could be some XML extract from a business accounting system
that you want to display or print.

Supporting such a format would mean creating a plugin and some
supporting stylesheets: Some might mean quite a lot - among others I
could mention a style sheet for HTML, WAP, XSL:FO, BlackBerry devices,
Ricoh copying machines, etc. etc.

It wouldn't be a nice tough if creating a new plugin for a customer
would mean restarting their production server as we expect to have to
create a lot of plugins on a regular basis.

Right now I've realized that even changing an XSLT stylesheet means
restaring AxKit - that's too bad, AxKit1 performed better in this
respect ;-).

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Dynamic configuration

2006-09-14 Thread Lars Skjærlund

 Again, this should go into the console, where cmd_reload would
reload
 all plugins, and clear all caches.

 Being able to just reload would be nice, since when you try 3
changes per 
 minute, typing a command in an extra window is a lot of work.

Hey, this is fun - I've finally had a breakthrough ;-)

It's pretty late in Denmark, and I have a lot to do tomorrow, but right
now I feel like going on and on and on...

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Dynamic configuration

2006-09-14 Thread Lars Skjærlund
Hi Jörg,

 Two instances of AxKit would run off the same file tree, but only the
test 
 server would pickup changes automatically (because of the 
 hypothetical developer_support plugin). When tests show you can
activate 
 the current set of changes, reload all relevant data in the main
server 
 through the console without restart. No need to have continuous
dependency 
 tracking on the production server, while having full development
comfort.

That sounds great!

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Providers?

2006-09-13 Thread Lars Skjærlund
Hi list,

I'm trying to work my way through the new AxKit2 code - but before I
figure it out myself, maybe someone would be kind enough to help me:
Where's the equivalent of an AxKit1 Provider?

If I want to write a plugin that can handle, say, an .odt file that
requires unzipping, which hook would be the proper place to do this? And
where do I put the result?

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: ANNOUNCE: AxKit2 1.0

2006-09-01 Thread Lars Skjærlund
Hi Matt (et al),

 It almost makes me wish I was still a  contractor so 
 I could help you out :-)

I'd love to have you on-board.

 Now I just have to work on persuading you to give AxKit2 
 a chance ;~)

I will.

But pheew - what an overwhelmingly response: I'll get back to all of
you, but right now I'm preparing a website describing the project. It's
not official yet, but for those of you who don't mind work in progress,
you can find it at http://www.vdms-project.org. I look forward to
feedback from all of you - this AxKit is an amazing tool.

Yes, the maillist will come, the source to download will come - but
it's yet but an idea, so please fill free to invent.

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: ANNOUNCE: AxKit2 1.0

2006-08-30 Thread Lars Skjærlund
 it. But we're in a unique position to
suggest to Ricoh that they create a native XSL:FO engine, completely
bypassing PostScript. That's quite a potential - and Ricoh listens a
lot.

* But VDMS can retrieve documents from a lot of other sources: As an
example, GroupWise has a SOAP interface, so we can create an XML based
mail client. The idea is to create a VFolder that will allow, say, the
building contractor to create folders for each project containing not
only ordinary files, but also all emails related to the project,
financial data from their accounting system, data from outside partners,
etc. etc. VFolder creates a unified view of all the data, it's XML
based, and handled by AxKit. We intend to create a VFolder as a Windows
Explorer extension, as a Java client for Ricoh and Blackberry, etc.

* The whole core project - the various AxKit plugins, the specification
of the various SOAP interfaces, the (huge amount) of XSLT stylesheets,
etc. will be released as Open Source. The customized clients for Ricoh,
Blackberry, Windows, etc. will probably be closed source and sold.

* I'm particularly thrilled by seeing that Matt has included RDF
support in his Gallery demo. That's another road we want to go with VDMS
as well - creating and handling metadata and making it available in RDF
format.

So - does this sound interesting? At least it's a lot of work, so if
anyone would like to join the party, please contact me the sooner the
better. We already have the customers, we have a global salesforce - we
just need a little coding...

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: ANNOUNCE: AxKit2 1.0

2006-08-28 Thread Lars Skjærlund
Hi Matt,

 It took a while, but we have finally released AxKit2, version 1.0.

I'm very excited to see that AxKit2 finally takes off - but also a bit
confused as I seem to miss a lot of features from 1.X.

My company is preparing a huge development project based on AxKit - a
virtual document management system. The core will be built on top of
AxKit, and we plan to contribute the whole core to the community.

Security, however, will be a very important factor, and we planned to
use almost all of Apache's security measures - including stuff like
digital certificates to identify the user etc. We can still do that by
proxying through Apache, of course.

But what about virtual hosting? I run a webhotel based on AxKit with a
lot of virtual servers: With your new architecture, wouldn't that mean
running a lot of AxKit servers on different ports, one for each virtual
server? And then proxying through Apache in order to get them all back
at port 80 - or am I missing something here? I wouldn't describe this as
a simpler setup...

On the other hand I like the idea (and simplicity) of beeing able to
run AxKit standalone: But like Tomcat, maybe we should have both
options?

By the way, we're running SuSE Linux and at least with that distro,
installing Apache and mod_perl is simply a few clicks with the mouse and
you're up and running; it's a long time since I thought installing
mod_perl was any hassle at all ;-). The new AxKit2 architecture seems to
be a lot more complicated to me - at least when you need some of the
more fancy Apache options.

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



Re: ANNOUNCE: AxKit2 1.0

2006-08-25 Thread Lars Skjærlund
Hi Matt,

 So go forth, download, and enjoy.

In case you haven't noticed yet: The axkit.org server is down - or
rather, it reports an error :-(

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


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



Re: Content type

2006-03-28 Thread Lars Skjærlund
Hi Michael,

 However, it seems that AxKit invariably sets the Content-Type to
 'text/xml' no matter what I do: I need be 'text/vnd.wap.wml' for WAP
to
 function properly.

Use something like

xsl:output method=xml media-type=text/vnd.wap.wml
doctype-system=http://www.wapforum.org/DTD/wml_1.1.xml;
doctype-public=-//WAPFORUM//DTD WML 1.1//EN/

That did the trick - thanks a lot ;-).

Regards,
Lars

Lars Skjærlund
Bukkeballevej 30
2960 Rungsted Kyst
Denmark

Tel.: +45 70 25 88 10
http://www.skjaerlund.dk/lars

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



document() problems

2005-12-31 Thread Lars Skjærlund
Hi list,

I have a problem using the document() function with AxKit.

When I try the following in an XLST stylesheet:

xsl:apply-templates select=document('menu.xml')/

it doesn't work: Using Sablotron, the browser just hangs (and, it
seems, AxKit starts eating host memory), using LibXSLT, I get a server
error and the log files yells about a possible loop.

What goes on here? Isn't the above syntax correct XPath? The document
is there and can be loaded in other ways, and you can see from the
logfile that it is indeed the correct document it's trying to parse.

Everything should be up-to-date, although AxKit is only up to the CPAN
version.

I would be happy to provide further details - only I don't know which
details you might want ;-).

Regards,
Lars

Lars Skjærlund, Network Consultant, Spinn International ApS
Bukkeballevej 30, 2960 Rungsted Kyst, Denmark
Tel.: +45 70 25 88 10, Fax: +45 70 25 88 44
Mail: [EMAIL PROTECTED] Web: http://www.spinn.dk
--

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



Segmentation Fault

2005-11-18 Thread Lars Skjærlund
Hi list,

I'm running AxKit 1.62 - and all of a sudden, my kit has stopped
working.

Instead, I get loads of 'Segmentation fault (11)' in the logfile.
Googling a little around, I see this is a wellknown phenomena, however,
most hits are rather old.

What's the present state - and what can I do about it?

Regards,
Lars

--
Lars Skjærlund
Bukkeballevej 30
2960 Rungsted Kyst
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.dk/lars


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



How to return XML code from taglib?

2005-01-31 Thread Lars Skjærlund
Hi list,

I'm trying to figure out how to return XML code from a taglib?

When I try to return, say, like the following:

return 'titleMy doc/title';

what is actualle returned is 'lt;titlegt;My doclt;/titlegt;'.

I'm using TaglibHelper, and I'm perfectly aware that I can return, say,
{ title = 'My doc' }. However, in the present situation, I'm fetching a
large pre-formatted Docbook document from a database, so it would be
impractical at best to convert it to an anonymous hash.

But I cannot figure out how to return the string literal - ie., with
the XML tags intact.

Regards,
Lars

Lars Skjærlund, Network Consultant, Spinn International ApS
Bukkeballevej 30, 2960 Rungsted Kyst, Denmark
Tel.: +45 70 25 88 10, Fax: +45 70 25 88 44
Mail: [EMAIL PROTECTED] Web: http://www.spinn.dk
--

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