public final class XSLTransformer extends Object
By default, all XSLT templates are cached, use the global property berlioz.cache.xslt
to change this behaviour.
Constructor and Description |
---|
XSLTransformer(File templates)
Creates a new XSLT Transformer with no fallback templates.
|
XSLTransformer(File templates,
URL fallback)
Creates a new XSLT Transformer.
|
Modifier and Type | Method and Description |
---|---|
static void |
clearAllCache()
Clears the internal XSLT cache.
|
void |
clearCache()
Clears the internal XSLT cache.
|
String |
getEtag()
Returns an ETag corresponding to the templates.
|
File |
templates()
Returns the file used by this transformer to produce the templates.
|
XSLTransformResult |
transform(String content,
javax.servlet.http.HttpServletRequest req,
Service service)
Transforms the Specified content using XSLT.
|
static String |
transformFailSafe(String content,
URL url)
Performs a fail safe transformation using the internal templates.
|
public XSLTransformer(File templates)
templates
- The location of the templates.public XSLTransformResult transform(String content, javax.servlet.http.HttpServletRequest req, Service service)
content
- The XML content to transform.req
- The HTTP Servlet request.service
- Required only to provide more information in the logs in case of errors.public static String transformFailSafe(String content, URL url)
content
- The XML to transform.url
- The URL to use.public File templates()
public String getEtag()
public void clearCache()
public static void clearAllCache()
Copyright © 2016 Allette Systems. All rights reserved.