Debugging strange problems, unwanted persistance and similar (was: Re: Provider problems)

2003-10-13 Thread Jörg Walter
On Thursday, 09. October 2003 21:37, Christian Jaeger wrote:
> >- 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).

See http://www.axkit.org/wiki/view/AxKit/DebuggingStrangeProblems

-- 
CU
  Joerg

PGP Public Key at http://ich.bin.kein.hoschi.de/~trouble/public_key.asc
PGP Key fingerprint = D34F 57C4 99D8 8F16 E16E  7779 CDDC 41A4 4C48 6F94


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



Re: Provider problems

2003-10-09 Thread Christian Jaeger
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]


Re: Provider Problems

2003-06-26 Thread Kip Hampton
Robert Ferney wrote:
Sorry for the mail spam yall.
No problem-- sorry you had to resort to such a one-sided conversation 
:-) Just to follow up, though: you're right, you should be using 
AxContentProvider instead of AxProvider. I'll post the details (that a 
crappy SMTP host precluded me from sending yesterday) below:

Providers come in two flavors: Content Providers for fetching source of 
the XML content to be transformed/delivered, and Style Providers for 
fetching the source of the stylesheets that will be applied during the 
various transformation steps. By default, the Provider::File class (that 
 grabs data from files on disk) is used for both.

When overriding the default Provider you have a choice of three 
configuration directives to control behavior:

1) AxContentProvider  -- this sets the class that will be 
used to select the source XML (and dependencies) for the content 
associated w/ the current request.

2) AxStyleProvider  -- this sets the Provider class for the 
stylesheet documents (and dependencies) for the current set of 
transformations.

3) AxProvider  -- this sets *both* the Style Provider and 
Content Provider to the same class (meaning that the same class has to 
be prepared to return both the source content and the stylesheet content).

I suspect that your Edu::Provider::Student class is expecting to return 
only the content source (not the stylesheet source as well) so you 
should use the AxContentProvider directive instead of AxProvider.

Note that the reason you only see the error when an AxAddProcessor
directive is present is that, with that directive in place, plus the use
of AxProvider (rather than AxContentProvider) AxKit is trying to use
your Edu::Provider::Student to fetch the source for the given stylesheet
and by having a transforation defined you expose the fact that your
Provider was meant only to return the base content not the stylesheet data.
-kip

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


Re: Provider Problems

2003-06-25 Thread Robert Ferney
Sorry for the mail spam yall.

ended up digging through the source for 
package Apache::AxKit::Provider::File;
...
sub get_strref {
...
throw Apache::AxKit::Exception::IO(
  -text => "$self->{file} is a directory - please overload File
provider and use AxContentProvider option");
...
}

I think my problem was that my configuration was using 
AxProvider My::Provider
instead of 
AxContentProvider My::Provider

Changed that and now it works.

On Wed, 2003-06-25 at 18:48, Robert Ferney wrote:
> Ok, found the documentation for this..
> http://www.axkit.org/wiki/view/AxKit/Apache::AxKit::Provider#
> silly me.
> 
> On Wed, 2003-06-25 at 18:28, Robert Ferney wrote:
> > I took a closer look at the error log.
> > It appears that the Provider is trying to handle the request for the
> > stylesheet even though the request is outside of the location that it is
> > supposed be handling,
> > 
> > so, perhaps more relevant question.
> > How do you get your provider to ignore requests for stuff it shouldn't
> > be handling in the first place.
> > 
> > 
> > 
> > -
> > 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]


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



Re: Provider Problems

2003-06-25 Thread Robert Ferney
Ok, found the documentation for this..
http://www.axkit.org/wiki/view/AxKit/Apache::AxKit::Provider#
silly me.

On Wed, 2003-06-25 at 18:28, Robert Ferney wrote:
> I took a closer look at the error log.
> It appears that the Provider is trying to handle the request for the
> stylesheet even though the request is outside of the location that it is
> supposed be handling,
> 
> so, perhaps more relevant question.
> How do you get your provider to ignore requests for stuff it shouldn't
> be handling in the first place.
> 
> 
> 
> -
> 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: Provider Problems

2003-06-25 Thread Robert Ferney
I took a closer look at the error log.
It appears that the Provider is trying to handle the request for the
stylesheet even though the request is outside of the location that it is
supposed be handling,

so, perhaps more relevant question.
How do you get your provider to ignore requests for stuff it shouldn't
be handling in the first place.



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



Re: Provider Problems

2003-06-25 Thread Robert Ferney
On Wed, 2003-06-25 at 17:24, Michael Chamberlain wrote:
> >> Any ideas as to what is going on?
> >>
> 
> I'd guess that your stylesheet isn't valid xml.
> 
> Mike.

I thought of that, but when I test the same stylesheet by using an
on-disk version of the xml file the provider is generating and specify
the stylesheet either with the 
  AxAddProcessor text/xsl /xslt/user.xsl
or by adding the specification in via the xml header stylesheet
directive it works, without errors.. 
the stylesheet isn't changing, just not using the provider, which also
works by itself.. ie: I can browse to the provided file, as long as I
don't try to apply a stylesheet.

Attaching the stylesheet ..


http://www.w3.org/1999/XSL/Transform";
version="1.0">

http://www.w3.org/TR/REC-html40/loose.dtd";
cdata-section-elements = ""
indent = "yes"
media-type = "text/html" /> 


  

  
  




  



  
  
  
  
  
  






  

  


  mailto:{.}";>

  





  

  


  





   
 
   




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

Re: Provider Problems

2003-06-25 Thread Robert Ferney
PS: I tried making a plain on disk xml file in another directory like
such..
---



  rob
  Robert
  Robert William Ferney
  Ferney
  [EMAIL PROTECTED]


and it works

On Wed, 2003-06-25 at 17:19, Robert Ferney wrote:
> I'm having trouble using a Provider, when I try to specify a Stylesheet.
> 
> my .htaccess file looks like this.
> -
> 
>   PerlHandler AxKit
>   AxProvider Edu::Provider::Student
> 
> #  AxAddProcessor text/xsl /xslt/user.xsl
> 
>   AddType text/xml .xml
>   AddHandler axkit .xml
> 
> -
> The Provider output looks like this.
> -
> 
> 
>   rob
>   Robert
>   Robert William Ferney
>   Ferney
>   [EMAIL PROTECTED]
> 
> -
> When I uncomment the AxAddProcessor I get the following error in my
> apache error log.
> --
> compilation error: file /user/rob.xml element users
> xsltParseStylesheetProcess : document is not a stylesheet
> [Wed Jun 25 17:00:01 2003] [error] [client 192.168.0.4] [AxKit] [Error]
> Can't call method "transform" on an undefined value at
> /usr/lib/perl5/site_perl/5.6.1/i386-linux/Apache/AxKit/Language/LibXSLT.pm line 120.
> --
> Any ideas as to what is going on?
> 
> 
> 
> 
> -
> 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]