I thought I'd just post here what I sent to the axdtk list, in case there are people here who don't know what the heck I'm talking about... If this perks your interest, send a mail to [EMAIL PROTECTED], download the toolkit, and start asking questions... What is the AXDTK? It's a system very much like Cocoon (http://xml.apache.org/cocoon/), but based on mod_perl. The idea is to allow a few things: - Stylesheets and XML files get associated automatically using the w3c semantics (http://www.w3.org/TR/xml-stylesheet). - Pre and Post processing can be performed using mod_perl stacked handlers. - Output is cached automatically if the underlying system uses DOM, otherwise the stylesheet processor developer has to implement caching himself, however the hooks are provided for this. - Stylesheets can cascade if based on DOM trees. For those unfamiliar with Cocoon, here's what happens: 1. A request comes in for an XML file. 2. If someone has installed a stacked handler prior to Apache::XMLStylesheet, that handler is called. One idea for such handlers is to extract a media type by browser sniffing (e.g. sets the media to "handheld"). Another idea is to take a preferred style from the querystring such as "style=no%20images". 3. Apache::XMLStylesheet checks its cache for a matching set of combined parameters (file, style, media). If the cache says that the XML file is older than the cache, use the list of stylesheets in the cache. If the cache is older than the file, parse the file for the xml-stylesheet processing instructions. 4. Check all the stylesheets exist. 5. If all the stylesheets exist, check the difference in timestamps between the xml file and all the stylesheet files, and the output cache file. If any are newer than the output cache file, then we re-run all the styles against the xml file. If they're all older we stop there, set the filename to the cached file, and return DECLINED. Apache obliges and returns the cached file to the browser for us. 6. If we re-create, we have mark off stylesheet type mappings against modules or functions. That is, the type="..." attribute in the stylesheet processing instruction gives us a pointer as to what module to use to process that stylesheet (based on some info in your httpd.conf file). We load that module and execute the function, passing in the stylesheet and the xml filename as parameters. 7. Modules based on the DOM can use the mod_perl API to set the $r->pnotes('dom_tree') value when they're done, rather than printing out the results. This is how the caching works, and how cascading works. Modules that aren't based on the DOM can't cascade... yet. 8. The resulting DOM tree is printed out both to the cache file and to the browser. The DOM tree is disposed of. That, in a nutshell, is it. Currently it's a work in progress. Today I hope to finish the version that does all the caching work and cascading stylesheets. If anyone wants to volunteer to help, here's what I consider needs done: - A cool web page ;-) - Get Xalan/Xerces working on Unix. This is pretty vital to the success, IMHO. See http://xml.apache.org/ - Write modules that plugin to this architecture that perform the following functionality: - SQL plugin using DBI. Should take an XML file (or DOM tree), parse out connection information and run the SQL. Produce another DOM tree and put that DOM tree in $r->pnotes('dom_tree') - Implement other stylesheet processors, like XPathScript and NotXSLT - Get the word out! Perl must not be behind in the XML world for much longer! Download AXDTK at http://xml.sergeant.org/download/ It's not well organised right now. The key component is Apache::XMLStylesheet. To use that you need XML::Parser and Apache::MimeXML(0.05). The only plugins available are Apache::XPathScript and Apache::XPath::NotXSLT, and an XSLT plugin that's in the list archive. -- <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