Constructor and Description |
---|
XSLDocument(InputStream stream)
Public ctor, from XSL as an input stream.
|
XSLDocument(String src)
Public ctor, from XSL as a string.
|
XSLDocument(URL url)
Public ctor, from URL.
|
XSLDocument(XML src)
Public ctor, from XML as a source.
|
Modifier and Type | Method and Description |
---|---|
static XSL |
make(InputStream stream)
Make an instance of XSL stylesheet without I/O exceptions.
|
static XSL |
make(URL url)
Make an instance of XSL stylesheet without I/O exceptions.
|
String |
toString() |
XML |
transform(XML xml)
Transform XML to another one.
|
public XSLDocument(@NotNull(message="XML can\'t be NULL") XML src)
src
- XSL document bodypublic XSLDocument(@NotNull(message="XSL can\'t be NULL") String src)
src
- XML document bodypublic XSLDocument(@NotNull(message="URL can\'t be NULL") URL url) throws IOException
url
- Location of documentIOException
- If fails to readpublic XSLDocument(@NotNull(message="XSL input stream can\'t be NULL") InputStream stream) throws IOException
stream
- XSL input streamIOException
- If fails to readpublic static XSL make(@NotNull(message="XSL input stream can\'t be NULL") InputStream stream)
This factory method is useful when you need to create an instance of XSL stylesheet as a static final variable. In this case you can't catch an exception but this method can help, for example:
class Foo { private static final XSL STYLESHEET = XSLDocument.make( Foo.class.getResourceAsStream("my-stylesheet.xsl") ); }
stream
- Input streampublic static XSL make(@NotNull(message="URL can\'t be NULL") URL url)
url
- URL with contentmake(InputStream)
Copyright © 2012–2014 jcabi.com. All rights reserved.