Class StylesheetCache


  • public class StylesheetCache
    extends java.lang.Object
    A cache of the stylesheets (as XsltExecutables) used in calls to the fn:transform function, in a stylesheet or query.
    • Constructor Detail

      • StylesheetCache

        public StylesheetCache()
    • Method Detail

      • getStylesheetByText

        public XsltExecutable getStylesheetByText​(java.lang.String style)
        Get the stylesheet (XsltExecutable) in the cache associated with the supplied stylesheet text string.
        Parameters:
        style - the stylesheet text as a string (as supplied in the stylesheet-text option of fn:transform())
        Returns:
        the XsltExecutable corresponding to this stylesheet-text, if already cached.
      • getStylesheetByLocation

        public XsltExecutable getStylesheetByLocation​(java.lang.String style)
        Get the stylesheet (XsltExecutable) in the cache associated with the supplied stylesheet location string.
        Parameters:
        style - the URI for the stylesheet location (as supplied in the stylesheet-location option of fn:transform())
        Returns:
        the XsltExecutable corresponding to this stylesheet-location, if already cached.
      • getStylesheetByNode

        public XsltExecutable getStylesheetByNode​(NodeInfo style)
        Get the stylesheet (XsltExecutable) in the cache associated with the supplied stylesheet node.
        Parameters:
        style - the root node of the stylesheet (as supplied in the stylesheet-node option of fn:transform())
        Returns:
        the XsltExecutable corresponding to this stylesheet-node, if already cached.
      • setStylesheetByText

        public void setStylesheetByText​(java.lang.String style,
                                        XsltExecutable xsltExecutable)
        Set a key-value pair in the cache for stylesheets referenced by stylesheet text.
        Parameters:
        style - the stylesheet text as a string (as supplied in the stylesheet-text option of fn:transform())
        xsltExecutable - the compiled stylesheet
      • setStylesheetByLocation

        public void setStylesheetByLocation​(java.lang.String style,
                                            XsltExecutable xsltExecutable)
        Set a key-value pair in the cache for stylesheets referenced by stylesheet location.
        Parameters:
        style - the URI for the stylesheet location (as supplied in the stylesheet-location option of fn:transform())
        xsltExecutable - the compiled stylesheet
      • setStylesheetByNode

        public void setStylesheetByNode​(NodeInfo style,
                                        XsltExecutable xsltExecutable)
        Set a key-value pair in the cache for stylesheets referenced by stylesheet root node.
        Parameters:
        style - the root node of the stylesheet (as supplied in the stylesheet-node option of fn:transform())
        xsltExecutable - the compiled stylesheet