I've just thought of a really cool idea, that would be rather easy to
implement...
First of all, when someone requests an XML document, it looks for the
<?xml-stylesheet?> processing instruction, according to the w3c
specs. We parse the "type" attribute and get:
text/xsl
or
notxslt
or
Apache::MyPageProcessor
i.e. the full pi would be:
<?xml-stylesheet
href="/somestyle.sty"
type="Apache::MyPageProcessor"
?>
Then we have either a mapping table for "type" => module, or just try and
load the module specified by "type". If we find no matching module we
return DECLINED (for the Perl-XML list, this means we simply let the next
apache module in the chain handle the file). If we find a module, we call
Module->handler($r) (or Module::handler($r) depending on the prototype).
The idea is a plug-and-play XML stylesheet processing system, where you
can just drop in a new templating module and start creating XML files for
that module, without having to worry about server configuration or
changing anything (unless you need to change the type=>module mapping -
which we'd stick in the httpd.conf - so a reload is required for changes
to that).
Thoughts? Should I go ahead? (it's not much work - I've already got the
processing instruction parsing done).
--
<Matt/>
Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org