0.0.9 • Published 3 years ago

xslt3-loader v0.0.9

Weekly downloads
12
License
MIT
Repository
github
Last release
3 years ago

xslt3-loader for Webpack

This Web loader can load XSLT stylesheets using Saxon-JS 2. The compiler is called to convert the stylesheet into the SEF format. The result will be a module exporting a single constant, stylesheet, which can then be imported into the frontend application and used by Saxon-JS 2. At this point, only the free (XX) compiler is supported.

Usage

In your module.rules section of webpack.config.js, add a rule like so:

{
    test: /\.xsl$/,
    use: [ 'xslt3-loader' ]
}

In your application source, you can then import a stylesheet like this:

import { stylesheet as example } from '../example.xsl';

The stylesheet can then be used in invocations to Saxon-JS 2:

console.log(SaxonJS.transform({ stylesheetInternal: example,
                                sourceText: '<foo>bar</foo>',
                                destination: 'serialized' }).principalResult);
0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.1

4 years ago