https://github.com/informatix8/gulp-saxon-xslt
Gulp plugin to transform XML via Saxon
https://github.com/informatix8/gulp-saxon-xslt
gulp saxon xml xsl xslt
Last synced: about 1 year ago
JSON representation
Gulp plugin to transform XML via Saxon
- Host: GitHub
- URL: https://github.com/informatix8/gulp-saxon-xslt
- Owner: informatix8
- Created: 2019-11-25T17:38:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-02-05T13:22:43.000Z (over 1 year ago)
- Last Synced: 2025-03-28T20:37:16.404Z (over 1 year ago)
- Topics: gulp, saxon, xml, xsl, xslt
- Language: XSLT
- Size: 43.9 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gulp Saxon XSLT
Bring your own Saxon library to transform XML with XSL 2 or 3.
> ! Important
> This module only supports ESM.
## Features
- Easily use `` to take advantage of other external libraries
- Supply parameters (variables) to the XSL file
- Splitting output via `` adds documents to the gulp stream
- Supports DTDs referenced from XML
- Handle your own error events
## Usage
### Install
```shell
npm install @informatix8/gulp-saxon-xslt --save-dev
```
## Example
```javascript
import gulp from 'gulp';
import xslt from '@informatix8/gulp-saxon-xslt';
export function xslt() {
return gulp
.src('*.xml', { buffer: false })
.pipe(
xslt({
jar: 'saxon9he.jar',
xsl: 'stylesheet.xsl',
params: {
param1: 'foo',
param2: 'bar'
},
debugMode: false,
abortOnError: true
})
)
.on('end', function handleEnd() {
console.log('XSLT Ended');
})
.on('error', function handleError(err) {
console.log('Caught Error');
console.error(err);
})
.pipe(gulp.dest('dist/'));
}
```
## Release
```shell
git tag -a vX.Y.Z
git push origin master
git push origin --tags
npm publish --access=public .
```