public final class RsXslt extends RsWrap
The encapsulated response must produce an XML document with an attached XSL stylesheet, for example:
<?xml version="1.0"?> <?xml-stylesheet href="/xsl/home.xsl" type="text/xsl"?> <page/>
RsXslt
will try to find that /xsl/home.xsl
resource in classpath. If it's not found a runtime exception will thrown.
The best way to use this decorator is in combination with
RsXembly
, for example:
new RsXSLT( new RsXembly( new XsStylesheet("/xsl/home.xsl"), new XsAppend( "page", new XsDate(), new XsLocalhost(), new XsSLA() ) ) )
Note: It is highly recommended to use Saxon as a default XSL transformer. All others, including Apache Xalan, won't work correctly in most cases.
The class is immutable and thread-safe.
RsXembly
Constructor and Description |
---|
RsXslt(Response rsp)
Ctor.
|
RsXslt(Response rsp,
URIResolver resolver)
Ctor.
|
public RsXslt(Response rsp)
rsp
- Original responsepublic RsXslt(Response rsp, URIResolver resolver)
rsp
- Original responseresolver
- URI resolverCopyright © 2015–2017 Take. All rights reserved.