Style Processor Configuration Cheatsheet
So far, we have looked at the various individual elements that can be
used to control how AxKit applies style transformations. So many, in
fact, that seeing how these parts all fit together may be a bit
tough. For example, a named style block (selected by a StyleChooser
based on an environmental condition) may contain one or more
AxAddDTDProcessor
or similar
conditional processing directives that are only applied if an
additional condition is met. True AxKit mastery comes from knowing
how to combine all its various configuration options to create
elegant styling rules that meet the need of your specific
application.
To help examine the processing order for various configuration
combinations, we will create a series of very simple XSLT stylesheets
whose sole purpose is to show the order in which AxKit applies a
given style. The stylesheet in Example 4-2, alpha.xsl, simply
appends the string . . . Alpha
processed to the text of the top-level
root element of the document being processed.
Example 4-2. alpha.xsl
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <root><xsl:value-of select="/*"/> . . . Alpha processed</root> </xsl:template> </xsl:stylesheet>
The tiny sample XML document used for the transformations is shown in Example 4-3.
Example 4-3. minimal.xml
<?xml version="1.0"?> <root>Base content</root>
Add more stylesheets to these—beta.xsl,
gamma.xsl, and so on—that ...
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