public final class RsXSLT extends Object implements Response
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() ) ) )
The class is immutable and thread-safe.
RsXembly
Constructor and Description |
---|
RsXSLT(Response rsp)
Ctor.
|
RsXSLT(Response rsp,
URIResolver rslv)
Ctor.
|
public RsXSLT(Response rsp)
rsp
- Original responsepublic RsXSLT(Response rsp, URIResolver rslv)
rsp
- Original responserslv
- URI resolverpublic List<String> head() throws IOException
Response
head
in interface Response
IOException
- If something goes wrongpublic InputStream body() throws IOException
Response
body
in interface Response
IOException
- If something goes wrongCopyright © 2015 Takes. All rights reserved.