XSLT transformation filter, its helper classes and transformation preferences management. The package is centered around {@link org.jasig.portal.rendering.sax.xslt.TransformationFilter}, which implements a general XSLT SAX rendering component. The filter is configured with a complex set of preferences defined by the {@link org.jasig.portal.rendering.sax.xslt.ITransformerPreferences} interface. The preferences consist of stylesheet description, XSLT params and parameterized element attributes.
Stylesheet description ({@link org.jasig.portal.rendering.sax.xslt.IStylesheetDescription}) contains static information about the stylesheet: location of the xslt file, whether or not the stylesheet defines output mime type (and if so, what that mime type is). The description also includes a set of param descriptions ({@link org.jasig.portal.rendering.sax.xslt.IParamDescription}, and a description of all parameterized attributes ({@link org.jasig.portal.rendering.sax.xslt.IElementAttributeDescription}).
Stylesheet preferences implementation is responsible for keeping track of current values of stylesheet params and element attributes. For example, {@link org.jasig.portal.rendering.sax.xslt.DefaultTransformerPreferences} obtains an initial map of param values by merging a set of supplied param values (normally obtained from persistant store for a particular user) and default param values from the stylesheet description. The same task is even more complex for the element attributes, and is delegated to the {@link org.jasig.portal.rendering.sax.xslt.DefaultElementAttributes} class, which merges supplied and default values, and maintains a set of current values afterwards.
{@link org.jasig.portal.rendering.sax.xslt.ITransformerHelper} assists TransformationFilter
in
obtaining Transformer
and Templates
instances for the desired XSLT stylesheet (much like
org.jasig.portal.utils.XSLT did). The default implementation ({@link org.jasig.portal.rendering.sax.xslt.DefaultTransformerHelper})
also provides caching capabilities.