src/transformer.js
function _transform( xslStr, xmlDoc, xsltParams ) {
    const params = xsltParams || {};
    return new Promise( ( resolve, reject ) => {
        libxslt.parse( xslStr, ( error, stylesheet ) => {
            if ( error ) {
                reject( error );
            } else {
                stylesheet.apply( xmlDoc, params, ( error, result ) => {
                    if ( error ) {
                        reject( error );
                    } else {
                        resolve( result );
                    }
                } );
            }
        } );
    } );
}
function _transform( xslStr, xmlDoc, xsltParams ) {
    const params = xsltParams || {};
    return new Promise( ( resolve, reject ) => {
        libxslt.parse( xslStr, ( error, stylesheet ) => {
            if ( error ) {
                reject( error );
            } else {
                stylesheet.apply( xmlDoc, params, ( error, result ) => {
                    if ( error ) {
                        reject( error );
                    } else {
                        resolve( result );
                    }
                } );
            }
        } );
    } );
}
function _transform ( xslStr , xmlDoc , xsltParams ) { const params = xsltParams || { } ; return new Promise ( ( resolve , reject ) => { libxslt . parse ( xslStr , ( error , stylesheet ) => { if ( error ) { reject ( error ) ; } else { stylesheet . apply ( xmlDoc , params , ( error , result ) => { if ( error ) { reject ( error ) ; } else { resolve ( result ) ; } } ) ; } } ) ; } ) ; }
Performs a generic XSLT transformation

@param  {[type]} xslDoc libxmljs object of XSL stylesheet
@param  {[type]} xmlDoc libxmljs object of XML document
@return {Promise}       libxmljs result document object
Performs a generic XSLT transformation