java.lang.Object
org.apache.wicket.markup.transformer.XsltTransformer
- All Implemented Interfaces:
ITransformer
A processor to XSLT transform the output generated by a Component.
- Author:
- Juergen Donnerstag
- See Also:
-
Constructor Summary
ConstructorDescriptionConstruct.XsltTransformer
(String xslFile) Instead of using the default mechanism to determine the associated XSL file, it is given by the user. -
Method Summary
Modifier and TypeMethodDescriptiontransform
(Component component, CharSequence output) Apply a XSL transformation to the markup generated by a component.
-
Constructor Details
-
XsltTransformer
public XsltTransformer()Construct. -
XsltTransformer
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 Details
-
transform
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
-