Defining Style Processors
The most basic component used to define which transformations will be applied to a given resource within AxKit is perhaps best termed a style processor definition. These definitions indicate a single transformational step (applying an XSLT stylesheet or passing the content through a SAX Filter, for example) in what may be a chain of transformations. In their most basic and typical form, these style definitions declare two bits of crucial information: a MIME type that will be used by AxKit to determine which Language module will be used to transform the content, and a file path to a stylesheet (or other Language-specific argument) that will be used by that Language module to determine how to transform the content. Individual processor definitions may optionally be combined into named style and media groups that can then be selected conditionally, based on a number of factors.
By default, style processors are defined within AxKit in one of two ways: by using AxKit’s processor configuration directives or by special stylesheet processing instructions contained in the source documents themselves. (In Chapter 8, you’ll learn to create your own way to configure AxKit’s styling rules by rolling a custom ConfigReader module, but that’s another story.) The following illustrates how to create a simple named style containing a single style definition using AxKit’s server configuration directives. The lone processor definition contains the required MIME type and path ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access