![]() |
morphis | wax | |
![]() |
||
Translators: OverviewTranslators provide a means of converting a stream provided by a Requestor (the input stream), to another stream to be returned to the requesting device (the output stream). Translators can be written to do things like image scaling, color conversion, markup tag replacement, and XML conversion. Morphis provides two built-in translators, the NonTranslator for pass-through filtertering, and the SAX Translator for performing translation on XML streams (or, even HTML streams). Only one Translator is associated with a request, however, translators can be built to perform translation in multiple stages. The built-in SAX Translator is capable of performing XSL transformations as defined by the W3C at http://www.w3.org/Style/XSL/. This type of transformation is able to turn an HTML or XML stream into a vastly different HTML or XML stream based on a set of translation rules. Morphis uses Apache Xalan XSLT processor, and Xerces XML parser to perform XSLT transformation. The translator tag in dispatch.xml is used to define translators. The filter tag inside of a translator enumerates different steps performed in the translation. Each filter may have a parameter associated with it. The implementation of filters and parameters is dependent on the Translator. Filters are ususually reserved for "advanced" Translators, and these tags are not required. The SAX Translator works in this fashion.
More about Translators: Since it plays such an important role in Morphis, an entire section has been devoted to the SAX Translator.
|
||
![]() |