Skip to content

Commit

Permalink
#35 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegor Bugayenko committed Nov 21, 2014
1 parent 4c29b2a commit b998b6e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
8 changes: 0 additions & 8 deletions src/main/java/com/jcabi/xml/XSL.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,6 @@
@Immutable
public interface XSL {

/**
* Strip spaces.
* @since 0.14
*/
XSL STRIP = XSLDocument.make(
XSL.class.getResourceAsStream("strip.xsl")
);

/**
* Transform XML to another one.
* @param xml Source XML document
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/jcabi/xml/XSLDocument.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@
@SuppressWarnings("PMD.TooManyMethods")
public final class XSLDocument implements XSL {

/**
* Strip spaces.
* @since 0.14
*/
public static final XSL STRIP = XSLDocument.make(
XSL.class.getResourceAsStream("strip.xsl")
);

/**
* DOM document builder factory.
*/
Expand Down
4 changes: 3 additions & 1 deletion src/test/java/com/jcabi/xml/XSLDocumentTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ public void transformsIntoText() throws Exception {
@Test
public void stripsXml() throws Exception {
MatcherAssert.assertThat(
XSL.STRIP.transform(new XMLDocument("<a> <b/> </a>")).toString(),
XSLDocument.STRIP.transform(
new XMLDocument("<a> <b/> </a>")
).toString(),
Matchers.containsString("<a>\n<b/>\n</a>")
);
}
Expand Down

0 comments on commit b998b6e

Please sign in to comment.