Perhaps simpler still is to implement the get_styles() method in your Provider subclass.
...
Thanks, Kip. I had considered the get_styles() approach, but realized it wouldn't work because it hard-codes too much into the Provider that should be configurable in httpd.conf or .htaccess. As an example of what I want to allow:
<Files *.rdf> AxAddProcessor normalize-rdf.xsl # Something here to add pressrelease.xsl only if the rdf:type # is 'http://lojjic.net/rdf/press-release' <AxMediaType screen> AxAddProcessor screen-output.xsl </AxMediaType> <AxMediaType ...... </Files>
Just because that setup uses the rdf:type to decide whether to apply a single step in the pipeline shouldn't mean I have to pull the entire thing into the provider's get_styles(). I can't build the "normal" parts of the pipeline in Apache directives first and then pull it into get_styles() and insert my special style because I can't make an assumption where it should be inserted, or what rdf:type's should be mapped to what stylesheet. It should all be configurable with some directive just like any other Processor. AxAddDynamicProcessor seems like that directive.
But you're right, Jason, the fact that AddDynamicProcessor only appends to the list of styles regardless of where the directive appears (making it different from the way all the other directive work) indicates, to me at least, that someone cheated and took the "first thing that worked" approah the while implementing it. Someone have counter argument to that?
More info on tracking this down: The style list itself is built in Apache::AxKit::ConfigReader->GetMatchingProcessors (line 343) ... it loops through each Processor, checking its type and performing the appropriate action. It then loops through all DynamicProcessors, running the handler for each and appending the returned style(s) to the pipeline. If the DynamicProcessors were a part of the Processors list with lc($type) eq 'dynamic' then it would work like I expected. I'd make a patch myself, but the Processors and DynamicProcessors lists themselves are built in axconfig.c, and I'm C-stupid. The relevant method in axconfig.c is ax_add_dynamic_processor, line 521.
Sorry if this info isn't any help, I want to help in any way I can but once we cross into C I'm pretty useless. :-)
--Jason
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
