Is possible, the library allow insert multiple parameters and use the xls functions like:
xsl:for-each select="catalog/cd"
tag, to insert multiple values with a loop
index.js
var xslt4node = require('xslt4node');
var config = {
xsltPath: 'discount.xsl',
sourcePath: 'order.xml',
result: 'result.xml',
props: {
indent: 'yes'
}
};
discount.xsl
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<order>
<xsl:for-each select="catalog/cd">
<albums>
<title>
<xsl:value-of select="title"/>
</title>
<artist>
<xsl:value-of select="artist"/>
</artist>
</albums>
</xsl:for-each>
</order>
</xsl:template>
order.xml
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
<cd>
<title>Greatest Hits</title>
<artist>Dolly Parton</artist>
<country>USA</country>
<company>RCA</company>
<price>9.90</price>
<year>1982</year>
</cd>
</catalog>