Skip to content

Commit ec692e1

Browse files
committed
#172 forSaxon
1 parent 56e2a2d commit ec692e1

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/main/java/com/jcabi/xml/XSLDocument.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)