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.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
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.

Installation

Before using this loader, the xslt3 command line utility needs to be installed on the local system using

npm install -g xslt3

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 so:

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

The stylesheet can then be used in invokations to Saxon-JS 2 like so:

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

Keywords

FAQs

Package last updated on 13 Jun 2020

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