Class XsltTransformer
- java.lang.Object
-
- org.apache.wicket.markup.transformer.XsltTransformer
-
- All Implemented Interfaces:
ITransformer
public class XsltTransformer extends Object implements ITransformer
A processor to XSLT transform the output generated by a Component.- Author:
- Juergen Donnerstag
- See Also:
XsltOutputTransformerContainer
,XsltTransformerBehavior
-
-
Constructor Summary
Constructors Constructor Description XsltTransformer()
Construct.XsltTransformer(String xslFile)
Instead of using the default mechanism to determine the associated XSL file, it is given by the user.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharSequence
transform(Component component, CharSequence output)
Apply a XSL transformation to the markup generated by a component.
-
-
-
Constructor Detail
-
XsltTransformer
public XsltTransformer()
Construct.
-
XsltTransformer
public XsltTransformer(String xslFile)
Instead of using the default mechanism to determine the associated XSL file, it is given by the user.- Parameters:
xslFile
- XSL input file path relative to the component's package. If the path does not end with .xsl, then it is considered as a basename and will be passed as-is toIResourceStreamLocator.locate(Class, String, String, String, java.util.Locale, String, boolean)
. All stylesheets must have the .xsl extension.
-
-
Method Detail
-
transform
public CharSequence transform(Component component, CharSequence output) throws Exception
Apply a XSL transformation to the markup generated by a component. The *.xsl resource must be located in the same path as the nearest parent with an associated markup and must have a filename equal to the component's id.- Specified by:
transform
in interfaceITransformer
- Parameters:
component
- The associated Wicket componentoutput
- The markup generated by the child components- Returns:
- The output which will be appended to the original response
- Throws:
Exception
-
-