Taking an AxKit to TT

2shortplanks on 2002-07-17T09:19:13

I got caught up in another side project again, this time working on AxKit and the Template Toolkit.

Now in AxKit you can place numerous processing instructions at the top of the XML file that tells it to run the file via several stylesheets in order. Each of these take the output from the previous layer and apply further transformations to it. It's a pipeline.

These stylesheets can be in various languages and how the stylesheet is interpreseted is governed by a pseudo mime type attribute on each processing instruction. For example, on my system the "text/xsl" mime type is tied via AxKit to the XML::LibXSLT module, causing that stylesheet to be loaded and used as an XSLT 'script' to process the current working document.

This is where the Template Toolkit stuff comes in. I've been working on adding it as another Language option, so you can use the mime type "text/tt". The document you're working on is then passed into the stylesheet template in the stash.

This has created a lot of alpha level code, which I have linked to here

People have been asking me why I'm doing this. Several reasons, but mainly because compatibility is good. I don't think there's any one tool for the job, and I think the largest number of tools that you can convince to play nice with each other the better.

Take AxKit and Template Toolkit into the Shower? Nope, I just code and go.


Mime type

darobin on 2002-07-17T10:53:58

If I may suggest a slightly different mime-type which would be more standard conformant than text/tt: application/x-tt. I know it's longer but who types in these things anyway? I always copy from something else ;-)

That's a very cool project, keep us posted!

Re:Mime type

2shortplanks on 2002-07-17T11:01:23

Sure...anyway it's not really up to the module author; You set this up in httpd.conf...

Re:Mime type

darobin on 2002-07-17T11:24:31

Yes I know, but the doc will dictate what people actually use :) I know it's the smallest nitpick, but the reason I jumped on it is because "text/xsl" is very reminiscent of M$'s borched attempt to provide their own version of XSLT.