Class XsltTransformer

    • Constructor Summary

      Constructors 
      Constructor Description
      XsltTransformer()
      Construct.
      XsltTransformer​(java.lang.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
      java.lang.CharSequence transform​(Component component, java.lang.CharSequence output)
      Apply a XSL transformation to the markup generated by a component.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XsltTransformer

        public XsltTransformer()
        Construct.
      • XsltTransformer

        public XsltTransformer​(java.lang.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 to IResourceStreamLocator.locate(Class, String, String, String, java.util.Locale, String, boolean) . All stylesheets must have the .xsl extension.
    • Method Detail

      • transform

        public java.lang.CharSequence transform​(Component component,
                                                java.lang.CharSequence output)
                                         throws java.lang.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 interface ITransformer
        Parameters:
        component - The associated Wicket component
        output - The markup generated by the child components
        Returns:
        The output which will be appended to the original response
        Throws:
        java.lang.Exception