File tree Expand file tree Collapse file tree
src/main/java/com/jcabi/xml Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -434,22 +434,23 @@ private Transformer transformer() {
434434 );
435435 }
436436 }
437- XSLDocument .prepare (trans );
438437 for (final Map .Entry <String , Object > ent : this .params .entrySet ()) {
439438 trans .setParameter (ent .getKey (), ent .getValue ());
440439 }
441- return trans ;
440+ return XSLDocument . forSaxon ( trans ) ;
442441 }
443442
444443 /**
445- * Prepare it for error logging .
444+ * Prepare it for Saxon .
446445 * @param trans The transformer
446+ * @return The same
447+ * @checkstyle ReturnCountCheck (5 lines)
447448 */
448449 @ SuppressWarnings ("deprecation" )
449- private static void prepare (final Transformer trans ) {
450+ private static Transformer forSaxon (final Transformer trans ) {
450451 final String type = trans .getClass ().getCanonicalName ();
451452 if (!"net.sf.saxon.jaxp.TransformerImpl" .equals (type )) {
452- return ;
453+ return trans ;
453454 }
454455 if (Version .getStructuredVersionNumber ()[0 ] < 11 ) {
455456 TransformerImpl .class .cast (trans )
@@ -468,6 +469,7 @@ private static void prepare(final Transformer trans) {
468469 )
469470 );
470471 }
472+ return trans ;
471473 }
472474
473475}
You can’t perform that action at this time.
0 commit comments