|
|||||||||
| Home >> All >> org >> infohazard >> maverick >> [ transform overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.infohazard.maverick.transform
Class XSLTransformFactory

java.lang.Objectorg.infohazard.maverick.transform.XSLTransformFactory
- All Implemented Interfaces:
- org.infohazard.maverick.flow.TransformFactory
- public class XSLTransformFactory
- extends java.lang.Object
- implements org.infohazard.maverick.flow.TransformFactory
- extends java.lang.Object
- Version:
- $Revision: 1.12 $ $Date: 2004/06/27 17:41:31 $
Factory for creating transformation pipelines using XSLT.
This factory has certain options which can be defined when declaring the factory. The defaults are shown here:
<transform-factory type="xslt" provider="org.infohazard.maverick.transform.XSLTransformFactory"> <default-output-type value="text/html"/> <template-caching value="preload"/> <uri-resolver value=""/> </transform-factory>
- default-output-type - Unless an individual transform explicitly specifies an output-type, this will be the http content-type for a successfully completing transformation.
- template-caching - Must be one of three values: preload, which compiles and caches all XSLT templates when the web application starts, lazy, which caches compiled XSLT templates but does not load them until they are requested, and disabled, which causes templates to be (re)loaded for every request. The default is preload.
- uri-resolver - The classname of a custom URI Resolver to set on all transformations.
The options for an individual transform are like this:
<transform type="xslt" path="blah.xsl" output-type="text/plain"/>
| Field Summary | |
protected static java.lang.String |
ATTR_DEFAULT_FINAL_CONTENT_TYPE
For the factory configuration |
protected static java.lang.String |
ATTR_FINAL_CONTENT_TYPE
|
protected static java.lang.String |
ATTR_MONITOR
|
protected static java.lang.String |
ATTR_PATH
For individual transform nodes |
protected static java.lang.String |
ATTR_TEMPLATE_CACHING
|
protected static java.lang.String |
ATTR_URI_RESOLVER
|
protected static java.lang.String |
DEFAULT_DEFAULT_FINAL_CONTENT_TYPE
If the init param for default content type is not specified, this becomes the actual default final content type. |
protected java.lang.String |
defaultFinalContentType
Unless specified in individual transform nodes, this is the content type for a successfully completed transformation. |
protected javax.servlet.ServletContext |
servletCtx
We need this to be able to look up real pathnames. |
protected int |
templateCachingStyle
Should templates be preloaded and cached |
protected javax.xml.transform.URIResolver |
uriResolver
Allow the user to override the URI resolver. |
protected static java.lang.String |
VAL_TEMPLATE_CACHING_DISABLED
|
protected static java.lang.String |
VAL_TEMPLATE_CACHING_LAZY
|
protected static java.lang.String |
VAL_TEMPLATE_CACHING_PRELOAD
|
| Constructor Summary | |
XSLTransformFactory()
|
|
| Method Summary | |
org.infohazard.maverick.flow.Transform |
createTransform(org.jdom.Element transformNode)
Creates a transform from the element (and any children, if appropriate). |
void |
init(org.jdom.Element factoryNode,
javax.servlet.ServletConfig servletCfg)
Factories will be initialized with the XML from the configuration file so that they can check for any options defined in child nodes, attributes, etc. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
ATTR_DEFAULT_FINAL_CONTENT_TYPE
protected static final java.lang.String ATTR_DEFAULT_FINAL_CONTENT_TYPE
- For the factory configuration
- See Also:
- Constant Field Values
ATTR_TEMPLATE_CACHING
protected static final java.lang.String ATTR_TEMPLATE_CACHING
- See Also:
- Constant Field Values
VAL_TEMPLATE_CACHING_LAZY
protected static final java.lang.String VAL_TEMPLATE_CACHING_LAZY
- See Also:
- Constant Field Values
VAL_TEMPLATE_CACHING_PRELOAD
protected static final java.lang.String VAL_TEMPLATE_CACHING_PRELOAD
- See Also:
- Constant Field Values
VAL_TEMPLATE_CACHING_DISABLED
protected static final java.lang.String VAL_TEMPLATE_CACHING_DISABLED
- See Also:
- Constant Field Values
ATTR_URI_RESOLVER
protected static final java.lang.String ATTR_URI_RESOLVER
- See Also:
- Constant Field Values
ATTR_PATH
protected static final java.lang.String ATTR_PATH
- For individual transform nodes
- See Also:
- Constant Field Values
ATTR_MONITOR
protected static final java.lang.String ATTR_MONITOR
- See Also:
- Constant Field Values
ATTR_FINAL_CONTENT_TYPE
protected static final java.lang.String ATTR_FINAL_CONTENT_TYPE
- See Also:
- Constant Field Values
DEFAULT_DEFAULT_FINAL_CONTENT_TYPE
protected static final java.lang.String DEFAULT_DEFAULT_FINAL_CONTENT_TYPE
- If the init param for default content type is not specified, this
becomes the actual default final content type. The default default :-)
- See Also:
- Constant Field Values
defaultFinalContentType
protected java.lang.String defaultFinalContentType
- Unless specified in individual transform nodes, this is the content type
for a successfully completed transformation.
templateCachingStyle
protected int templateCachingStyle
- Should templates be preloaded and cached
uriResolver
protected javax.xml.transform.URIResolver uriResolver
- Allow the user to override the URI resolver.
servletCtx
protected javax.servlet.ServletContext servletCtx
- We need this to be able to look up real pathnames.
| Constructor Detail |
XSLTransformFactory
public XSLTransformFactory()
| Method Detail |
init
public void init(org.jdom.Element factoryNode, javax.servlet.ServletConfig servletCfg) throws org.infohazard.maverick.flow.ConfigException
- Description copied from interface:
org.infohazard.maverick.flow.TransformFactory - Factories will be initialized with the XML from the configuration file
so that they can check for any options defined in child nodes,
attributes, etc.
- Specified by:
initin interfaceorg.infohazard.maverick.flow.TransformFactory
createTransform
public org.infohazard.maverick.flow.Transform createTransform(org.jdom.Element transformNode) throws org.infohazard.maverick.flow.ConfigException
- Description copied from interface:
org.infohazard.maverick.flow.TransformFactory - Creates a transform from the element (and any children, if appropriate).
- Specified by:
createTransformin interfaceorg.infohazard.maverick.flow.TransformFactory
|
|||||||||
| Home >> All >> org >> infohazard >> maverick >> [ transform overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.infohazard.maverick.transform.XSLTransformFactory