Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return through.obj(function(file, enc, callback) {
var context = getContext(file);
var t = this;
// output(context);
var templateXMLPath = getXMLPath(file, context);
var templateXSLPath = getXSLPath(file, context);
if(debug) gutil.log(templateXMLPath, templateXSLPath);
var documentString = renderer.renderFile(templateXMLPath, context);
context.xmlDocumentString = documentString.replace('', '');
var stylesheetString = renderer.renderFile(templateXSLPath, context);
output(documentString);
output(stylesheetString);
libxslt.parse(stylesheetString, function(err, stylesheet) {
if (err) {
alwaysOutput('\n\n' + stylesheetString);
t.emit('error', new PluginError({
plugin: 'MdtoXSLT',
message: 'Error parsing xsl stylesheet: ' + file.path + '; failed with error: ' + err
}));
return callback();
}
stylesheet.apply(documentString, {}, function(err, result) {
if (err) {
gutil.log(file.path);
alwaysOutput('\n\n' + documentString);
t.emit('error', new PluginError({
const document: libxmljs.XMLDocument = libxslt.libxmljs.parseXmlString('');
let stylesheet: libxslt.Stylesheet;
stylesheet = libxslt.parse('');
stylesheet = libxslt.parse(document);
libxslt.parse('', (err, result) => {
if (err == null) {
stylesheet = result;
}
});
libxslt.parse(document, (err, result) => {
if (err == null) {
stylesheet = result;
}
});
libxslt.parseFile('/path/to/file', (err, result) => {
if (err == null) {
stylesheet = result;
}
});
let applyOptions: libxslt.ApplyOptions = {};
applyOptions = {
outputFormat: 'string',
noWrapParams: true
import * as libxslt from 'libxslt';
import * as libxmljs from 'libxmljs';
const document: libxmljs.XMLDocument = libxslt.libxmljs.parseXmlString('');
let stylesheet: libxslt.Stylesheet;
stylesheet = libxslt.parse('');
stylesheet = libxslt.parse(document);
libxslt.parse('', (err, result) => {
if (err == null) {
stylesheet = result;
}
});
libxslt.parse(document, (err, result) => {
if (err == null) {
stylesheet = result;
}
});
libxslt.parseFile('/path/to/file', (err, result) => {
if (err == null) {
stylesheet = result;
import * as libxslt from 'libxslt';
import * as libxmljs from 'libxmljs';
const document: libxmljs.XMLDocument = libxslt.libxmljs.parseXmlString('');
let stylesheet: libxslt.Stylesheet;
stylesheet = libxslt.parse('');
stylesheet = libxslt.parse(document);
libxslt.parse('', (err, result) => {
if (err == null) {
stylesheet = result;
}
});
libxslt.parse(document, (err, result) => {
if (err == null) {
stylesheet = result;
}
});
libxslt.parseFile('/path/to/file', (err, result) => {
if (err == null) {
stylesheet = result;
}
});
import * as libxslt from 'libxslt';
import * as libxmljs from 'libxmljs';
const document: libxmljs.XMLDocument = libxslt.libxmljs.parseXmlString('');
let stylesheet: libxslt.Stylesheet;
stylesheet = libxslt.parse('');
stylesheet = libxslt.parse(document);
libxslt.parse('', (err, result) => {
if (err == null) {
stylesheet = result;
}
});
libxslt.parse(document, (err, result) => {
if (err == null) {
stylesheet = result;
}
});
libxslt.parseFile('/path/to/file', (err, result) => {