public class ERXSLTWrapper extends ERXNonSynchronizingComponent
Other uses include a simple transformation of the generated front end code to privide for "skinning". As there is only so much you can do with CSS, you might need to structurally change the generated HTML prior to handing it to the client.
Note that XSLT engines vary greatly in speed. The default case of using Xalan which is included by WO is probably not the best choice for a site with a little bit of traffic. Therefore there is an option where you can set the transformer factory name to use, you also need to include the corresponding jar into the classpath.
Name | Description |
---|---|
enabled | flag that decides if the transformation is applied. If not set, then only the content will be shown. |
stylesheet | name of the XLST stylesheet (mandatory) |
transformerFactory | name of the class for the XSLT transformer factory (optional, defaults to Xalan) |
framework | name of the XLST stylesheet's framework (optional) |
data | will be set to the transformed data (optional) |
stream | will be set to the transformed data (optional) |
nocache | flag that if set creates a new transformer instead of using the one in the cache. Useful when deleloping the stylesheet. |
Modifier and Type | Class and Description |
---|---|
static class |
ERXSLTWrapper.TemplatePool |
WOComponent._EventLoggingEnabler, WOComponent.Event
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
_dynamicBindings
_Extension, _IsEventLoggingEnabled, _keyAssociations
_CLASS
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
NullValue
_CLASS
Constructor and Description |
---|
ERXSLTWrapper(WOContext context)
Public constructor
|
Modifier and Type | Method and Description |
---|---|
void |
appendToResponse(WOResponse response,
WOContext context)
Overridden to get use apply the XLST transformation on the content.
|
static Transformer |
getTransformer(String framework,
String filename) |
static NSData |
transform(Transformer transformer,
NSData data) |
static String |
transform(Transformer transformer,
String xml) |
invokeAction, resetCachedBindingsInStatefulComponent, synchronizesVariablesWithBindings, takeValuesFromRequest
_awakeInContext, _checkAccess, _frameworkName, _includeCSSResources, _includeJavascriptResources, additionalCSSFiles, additionalJavascriptFiles, arrayValueForBinding, arrayValueForBinding, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, browser, checkAccess, clickToOpenEnabled, componentName, defaultCSSPath, defaultJavascriptPath, dynamicBindings, floatValueForBinding, intValueForBinding, isPageAccessAllowed, localizer, objectValueForBinding, objectValueForBinding, pageWithName, postAppendToResponse, preAppendToResponse, primaryCSSFile, primaryJavascriptFile, reset, shouldCheckAccess, stringValueForBinding, stringValueForBinding, useDefaultComponentCSS, useDefaultComponentJavascript
__valueForBinding, _associationWithName, _childTemplate, _cleanUpStatelessComponent, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, setVariableValueForName, sleep, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithName
public ERXSLTWrapper(WOContext context)
context
- the contextpublic void appendToResponse(WOResponse response, WOContext context)
appendToResponse
in class ERXNonSynchronizingComponent
response
- to which we are appendingcontext
- context of the responseTransformerException
public static Transformer getTransformer(String framework, String filename)
public static String transform(Transformer transformer, String xml) throws TransformerException
TransformerException
public static NSData transform(Transformer transformer, NSData data) throws TransformerException
TransformerException
Copyright © 2002 – 2024 Project Wonder.