/** * Converts a Source into a Result using a XSL processor. * <p> * The XSL stylesheet resource location is mandatory in the first extra parameter. * XSL Parameters may be passed as a Map in the second parameter. * * @see Transmogrifier#zap(java.lang.Object, java.lang.Object[]) */ @Override public T zap(Source source, Object... params) { ResultHolder<T> accessor = ResultHolderFactory.create(outputFormat); if (accessor == null) throw new IllegalArgumentException("Format " + outputFormat.getClass() + " is not supported"); Result result = accessor.createResult(); doZap(source, result, params); return accessor.getResult(); }
/** * Converts a Source into a typed result using a XQuery processor. * <p> * The XQ resource location is mandatory in the first extra parameter. Other * parameters may be passed as a Map in the second parameter. * * @see Transmogrifier#zap(java.lang.Object, java.lang.Object[]) */ @Override public T zap(Source source, Object... params) { ResultHolder<T> accessor = ResultHolderFactory.create(outputFormat); if (accessor == null) throw new IllegalArgumentException("Format " + outputFormat.getClass() + " is not supported"); Result result = accessor.createResult(); doZap(source, result, params); return accessor.getResult(); }