On Sunday, 15. December 2002 15:42, Kjetil Kjernsmo wrote:

Preface: Even after one year of AxKitting I am still not intimate with the 
provider code, so take my hints with care.

> Two interpretations of what process() should say comes to mind, either
>
> "yeah, it is my job to process this resource, but you've gotta ask
> exists() if it is actually here" or, process() should itself call
> exists() to see if the resource exists.

Actually I would expect exist() to have been called before. process() would 
check if the file is something sensible, so you get a way to only process 
data files. 

> Reading the docs, I think it seems that the job of process() is also to
> determine if the resource exists, so the latter interpretation seems
> correct, but then, what would we need exists() for?

In those providers I did, I did it exactly this way and it didn't do any harm. 
A separate exists() is important anyways, since you can use providers for 
more than just supplying the initial file. Think of XSLT's document() 
function, or more advanced stuff you might do in XSP.

> Another aspect I wonder about is whether process() should have the final
> say in if there is a sensible resource there, as opposed to just an
> error page (which may indeed contain useful directions for the user)?
> If process() returns 1, there should be a sensible resource there, or
> is this something that can be left to exists() to decide?

As I understand it, your first assumption is correct: it decides if the 
resource requested is actually usable by/retrievable through the provider.

> It also seems sensible that whenever exists() returns false, a 404
> response should be sent to the client, as the default behaviour. Does
> this happen?

*shrug*

-- 
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]

Reply via email to