| Modifier and Type | Field and Description |
|---|---|
static XSL |
STRIP
Strips spaces of whitespace-only text nodes.
|
| 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(String src,
Sources srcs)
Public ctor, from XSL as a string.
|
XSLDocument(String src,
Sources srcs,
Map<String,String> map)
Public ctor, from XSL as a string.
|
XSLDocument(URI uri)
Public ctor, from URI.
|
XSLDocument(URL url)
Public ctor, from URL.
|
XSLDocument(XML src)
Public ctor, from XML as a source.
|
| Modifier and Type | Method and Description |
|---|---|
String |
applyTo(XML xml)
Transform XML into text.
|
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.
|
XSL |
with(Sources src)
With this sources.
|
XSL |
with(String name,
String value)
With this parameter.
|
public static final XSL STRIP
This will NOT remove
existing indentation between Element nodes currently introduced by the
constructor of XMLDocument. For example:
<a>
<b> TXT </b>
</a>
becomes
<a>
<b> TXT </b>
</a>
public XSLDocument(@NotNull(message="XML can\'t be NULL")
XML src)
src - XSL 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="URI can\'t be NULL")
URI uri)
throws IOException
uri - Location of documentIOException - If fails to readpublic XSLDocument(@NotNull(message="XSL input stream can\'t be NULL")
InputStream stream)
stream - XSL input streampublic XSLDocument(String src)
src - XML document bodypublic XSLDocument(String src, Sources srcs)
src - XML document bodysrcs - Sourcespublic XSLDocument(@NotNull(message="XSL can\'t be NULL")
String src,
@NotNull(message="sources can\'t be NULL")
Sources srcs,
@NotNull(message="map of params can\'t be NULL")
Map<String,String> map)
src - XML document bodysrcs - Sourcesmap - Map of XSL paramspublic XSL with(@NotNull(message="sources can\'t be NULL") Sources src)
XSLpublic XSL with(@NotNull(message="name can\'t be NULL") String name, @NotNull(message="value can\'t be NULL") String value)
XSLpublic 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)@NotNull(message="XML is never NULL") public XML transform(@NotNull(message="XML can\'t be NULL") XML xml)
XSLCopyright © 2012–2015 jcabi.com. All rights reserved.