The last key piece to AxKit is how everything is tied together. We
have a clean separation of logic, presentation, and content, but
we've only briefly introduced using processing
instructions for setting up the way a file gets processed through the
AxKit engine. A generally better and more scalable way to work is to
use the AxKit configuration directives to specify how to process
files through the system.
Now if you wanted to display those DocBook files on WebTV as well as
ordinary web browsers, but you wanted to use a different stylesheet
for WebTV, you would use:
Now let's extend that to chained transformations.
Let's say you want to build up a table of contents
the same way in both views. One way you can do it is to modularize
the stylesheet. However, it's also possible to chain
transformations in AxKit, simply by defining more than one processor
for a particular resource:
Now the TV-based browsers will see the DocBook files transformed by
docbook_toc.xsl, with the output of that
transformation processed by docbook_tv.xsl.
This is exactly how we would build up an application using XSP:
This resolves the earlier issue we had where the XSP did not output
HTML, but something entirely different. Now we can see
why—because this way we can build dynamic web applications that
work easily on different devices!
There are four other configuration directives similar to
AxAddProcessor. They take two additional
parameters: one that specifies a particular way to examine the file
being processed and one to facilitate
the match. The directives are: