On Wednesday, Jan 22, 2003, at 20:44 Europe/London, Nik Clayton wrote:

How do,

Is AxKit supposed to pass non-XML data straight through without raising
errors?
No :-)

I've got some files and, in some circumstances, requesting the files
should generate some XML.  In other circumstances, the content of the
file should be sent through (or, at least, non-XML data should get sent
through).

    ..../foo.jpg              <-- Generates some XML
    ..../foo.jpg?size=small   <-- Generates image/jpeg data
Thinking some more about this problem, I think there's only one way to do it - using *both* a Plugin and a Provider.

Plugin
------

The job here is two-fold. First, to decide if AxKit should process this resource (and thus return OK), second, if it shouldn't process the resource, and a jpeg should be created, then to create the jpeg, cache it, set $r->filename() to the location of the cached jpeg, and then return DECLINED.

Provider
--------

If the plugin decides axkit needs to process this resource, you then need to somehow turn the request for the jpeg into some XML. I believe you've already got the code to do this, so I won't bore you with the details. But basically you do this with a Provider, and set it with AxContentProvider.


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

Reply via email to