Package net.sf.saxon.trans
Class StylesheetCache
java.lang.Object
net.sf.saxon.trans.StylesheetCache
A cache of the stylesheets (as XsltExecutables) used in calls to the fn:transform function, in a stylesheet or query.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetStylesheetByLocation
(String style) Get the stylesheet (XsltExecutable) in the cache associated with the supplied stylesheet location string.getStylesheetByNode
(NodeInfo style) Get the stylesheet (XsltExecutable) in the cache associated with the supplied stylesheet node.getStylesheetByText
(String style) Get the stylesheet (XsltExecutable) in the cache associated with the supplied stylesheet text string.void
setStylesheetByLocation
(String style, XsltExecutable xsltExecutable) Set a key-value pair in the cache for stylesheets referenced by stylesheet location.void
setStylesheetByNode
(NodeInfo style, XsltExecutable xsltExecutable) Set a key-value pair in the cache for stylesheets referenced by stylesheet root node.void
setStylesheetByText
(String style, XsltExecutable xsltExecutable) Set a key-value pair in the cache for stylesheets referenced by stylesheet text.
-
Constructor Details
-
StylesheetCache
public StylesheetCache()
-
-
Method Details
-
getStylesheetByText
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
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
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
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
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
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
-