Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xslt3-loader

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xslt3-loader

A Webpack loader that compiles XSLT transforms to Saxon's sef format

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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);

Keywords

FAQs

Package last updated on 11 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc