1111import com .jcabi .xml .XMLDocument ;
1212import com .jcabi .xml .XSL ;
1313import com .jcabi .xml .XSLDocument ;
14+ import io .github .secretx33 .resourceresolver .DefaultResourceLoader ;
1415import java .io .IOException ;
16+ import java .nio .charset .StandardCharsets ;
1517import java .util .Collection ;
1618import java .util .LinkedList ;
1719import java .util .Optional ;
@@ -40,9 +42,9 @@ final class LtByXsl implements Lint<XML> {
4042 private final XSL sheet ;
4143
4244 /**
43- * Motive document.
45+ * Path to motive document.
4446 */
45- private final Input doc ;
47+ private final String doc ;
4648
4749 /**
4850 * Ctor.
@@ -54,20 +56,18 @@ final class LtByXsl implements Lint<XML> {
5456 new ResourceOf (
5557 String .format ("org/eolang/lints/%s.xsl" , xsl )
5658 ),
57- new ResourceOf (
58- String .format ("org/eolang/motives/%s.md" , xsl )
59- )
59+ String .format ("org/eolang/motives/%s.md" , xsl )
6060 );
6161 }
6262
6363 /**
6464 * Ctor.
65- * @param xsl Relative path of XSL
66- * @param motive Relative path of a motive document
65+ * @param xsl Absolute path of XSL
66+ * @param motive Absolute path of a motive document
6767 * @throws IOException If fails
6868 */
6969 @ SuppressWarnings ("PMD.ConstructorOnlyInitializesOrCallOtherConstructors" )
70- LtByXsl (final Input xsl , final Input motive ) throws IOException {
70+ LtByXsl (final Input xsl , final String motive ) throws IOException {
7171 final XML xml = new XMLDocument (new IoCheckedText (new TextOf (xsl )).asString ());
7272 this .rule = new Xnav (xml .toString ())
7373 .element ("xsl:stylesheet" )
@@ -117,7 +117,9 @@ public Collection<Defect> defects(final XML xmir) {
117117
118118 @ Override
119119 public String motive () throws IOException {
120- return new IoCheckedText (new TextOf (this .doc )).asString ();
120+ return new DefaultResourceLoader ()
121+ .getResource (this .doc )
122+ .getContentAsString (StandardCharsets .UTF_8 );
121123 }
122124
123125 /**
0 commit comments