xslt.renderΒΆ

This command renders a view using XSLT.

Arguments:

view (string)
Location of the view. Use resolve(..) to resolve a view.
model (object)
Model that is passed to the view. This model is converted to XML.

Example:

var view = resolve('view/fruit.xsl');

var result = execute('xslt.render', {
    view: view,
    model: {
        fruits: [
            {
                name: 'Apple',
                color: 'Red'
            },
            {
                name: 'Pear',
                color: 'Green'
            }
        ]
    }
});