com.opensymphony.webwork.views.xslt
Class XSLTResult
java.lang.Object
com.opensymphony.webwork.views.xslt.XSLTResult
- All Implemented Interfaces:
- com.opensymphony.xwork.Result, Serializable
public class XSLTResult
- extends Object
- implements com.opensymphony.xwork.Result
XSLTResult provides support for XSLT generated views of WebWork actions.
XSLTResult dynamically creates a DOM representation of the invoking WebWork
action object and applies a specified stylesheet to it.
The DOM representation of the WebWork action is produced by JavaBeans
style introspection of the properties of the action using an
extensible AdapterFactory. Common Java types and collection are
supported as well as arbitrary beans composed of these types. (See
AdapterFactory). Action properties may also return their own DOMs
(Object implementing Node, Document, or other DOM types) which will then
appear directly as part of the the result DOM for the stylesheet.
The contents of the result tag normally specify the location of an XSL
stylesheet, relative to the servlet context. e.g.:
...
/foo.xsl
If the stylesheet location is absent, the raw XML is returned.
By default, stylesheets are cached for performance. This can be disabled
by setting the webwork property webwork.xslt.nocache to true.
XSLTResult utilizes a servlet context sensitive URIResolve
- Author:
- Philipp Meier, Pat Niemeyer (pat@pat.net
- See Also:
AdapterFactory,
Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_PARAM
public static final String DEFAULT_PARAM
- See Also:
- Constant Field Values
noCache
protected boolean noCache
XSLTResult
public XSLTResult()
setLocation
public void setLocation(String location)
- Deprecated. Use #setStylesheetLocation(String)
setStylesheetLocation
public void setStylesheetLocation(String location)
getStylesheetLocation
public String getStylesheetLocation()
setParse
public void setParse(boolean parse)
- If true, parse the stylesheet location for OGNL expressions.
- Parameters:
parse -
execute
public void execute(com.opensymphony.xwork.ActionInvocation invocation)
throws Exception
- Specified by:
execute in interface com.opensymphony.xwork.Result
- Throws:
Exception
getAdapterFactory
protected AdapterFactory getAdapterFactory()
setAdapterFactory
protected void setAdapterFactory(AdapterFactory adapterFactory)
getURIResolver
protected URIResolver getURIResolver()
- Get the URI Resolver to be called by the processor when it encounters an xsl:include, xsl:import, or document()
function. The default is an instance of ServletURIResolver, which operates relative to the servlet context.
getTemplates
protected Templates getTemplates(String path)
throws TransformerException,
IOException
- Throws:
TransformerException
IOException
getDOMSourceForStack
protected Source getDOMSourceForStack(Object action)
throws IllegalAccessException,
InstantiationException
- Throws:
IllegalAccessException
InstantiationException
Copyright © 2007 OpenSymphony. All Rights Reserved.