v3.0.0
·
44 commits
to main
since this release
Breaking Changes
Please note that the xsltProcess
method now is asynchronous (returns Promise<string>
):
import { Xslt, XmlParser } from 'xslt-processor';
// xmlString: string of xml file contents
// xsltString: string of xslt file contents
// outXmlString: output xml string.
const xsltClass = new Xslt();
const xmlParser = new XmlParser();
// Either
const outXmlString = xsltClass.xsltProcess(
xmlParser.xmlParse(xmlString),
xmlParser.xmlParse(xsltString)
);
// Or
xslt.xsltProcess(
xmlParser.xmlParse(xmlString),
xmlParser.xmlParse(xsltString)
).then(output => {
// `output` is equivalent to `outXmlString` (a string with XML).
});
Version 3 received <xsl:include>
tag, which relies on Fetch API, which is asynchronous. Version 2 doesn't support <xsl:include>
.
If you're planning to update your project with this version, adjust your code as needed.
What's Changed
- Bump tar from 6.1.15 to 6.2.1 by @dependabot in #91
<xsl:include>
by @leonelsanchesdasilva in #94
Full Changelog: v2.3.1...v3.0.0