All Projects → vecmezoni → Gulp Xslt

vecmezoni / Gulp Xslt

Licence: mit
XSLT transformation plugin for gulp

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Gulp Xslt

Xylophone
Xylophone
Stars: ✭ 23 (+155.56%)
Mutual labels:  xml
Web Fonts Generator Service
web font生成器:based on TTFRender, gulp-ttf2woff, and NodeJS. 简化中文字体定制。
Stars: ✭ 25 (+177.78%)
Mutual labels:  gulp
Gulp Frontnote
スタイルガイドジェネレーターFrontNoteのGulpプラグイン
Stars: ✭ 7 (-22.22%)
Mutual labels:  gulp
Snowflake
❄️ SVG in Swift
Stars: ✭ 924 (+10166.67%)
Mutual labels:  xml
Puppy
Starter kit and delivery system for building static prototypes with Twig
Stars: ✭ 25 (+177.78%)
Mutual labels:  gulp
Wordpress Starter
📦 A starter template for WordPress websites
Stars: ✭ 26 (+188.89%)
Mutual labels:  gulp
Vast Parser
Recursively requests and parses VAST chains into a single JavaScript object.
Stars: ✭ 18 (+100%)
Mutual labels:  xml
Generator Gulp Express Webapp
Yeoman generator for building a simple web app using express + gulp. This project contains proper project and build structure to be easily extensible.
Stars: ✭ 8 (-11.11%)
Mutual labels:  gulp
Just Task
Elegant javascript tasks
Stars: ✭ 25 (+177.78%)
Mutual labels:  gulp
Essa
Embeddable SCADA for Small Applications
Stars: ✭ 7 (-22.22%)
Mutual labels:  xml
Music Player
Android xml template layout for media/music player.
Stars: ✭ 24 (+166.67%)
Mutual labels:  xml
Ps Webapi
(Migrated from CodePlex) Let PowerShell Script serve or command-line process as WebAPI. PSWebApi is a simple library for building ASP.NET Web APIs (RESTful Services) by PowerShell Scripts or batch/executable files out of the box.
Stars: ✭ 24 (+166.67%)
Mutual labels:  xml
Hoverboard
Conference website template
Stars: ✭ 935 (+10288.89%)
Mutual labels:  gulp
Cheatyxml
CheatyXML is a Swift framework designed to manage XML easily
Stars: ✭ 23 (+155.56%)
Mutual labels:  xml
Gulp Boilerplate
A boilerplate for building web projects with Gulp.js.
Stars: ✭ 840 (+9233.33%)
Mutual labels:  gulp
Amazon Mobile Sentiment Analysis
Opinion mining of Mobile reviews on Amazon platform
Stars: ✭ 19 (+111.11%)
Mutual labels:  xml
Draggablelayout
Draggable XML Layout for Android
Stars: ✭ 26 (+188.89%)
Mutual labels:  xml
Litedb Webshell
Web Shell console application for LiteDB
Stars: ✭ 8 (-11.11%)
Mutual labels:  xml
Xmlbuilder Js
An XML builder for node.js
Stars: ✭ 843 (+9266.67%)
Mutual labels:  xml
Gulp Jsonlint
🔍 jsonlint plugin for Gulp
Stars: ✭ 26 (+188.89%)
Mutual labels:  gulp

gulp-xslt Build Status

XSL transformation plugin for gulp

Usage

example.xml

<?xml version="1.0" encoding="utf-8"?>
<foo>
    <bar attr="value">baz</bar>
    <bar>qux</bar>
</foo>

template.xsl

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


    <xsl:param name="someVariable">defaultValue</xsl:param>
    <xsl:param name="anotherVariable"/>


    <xsl:template match="foo">
        <output>
            <xsl:attribute name="attr">
                <xsl:value-of select="$someVariable"/>
            </xsl:attribute>
            <xsl:apply-templates select="$anotherVariable"/>
        </output>
    </xsl:template>


    <xsl:template match="bar">
        <xsl:copy-of select="."/>
    </xsl:template>


    <xsl:output method="xml" encoding="utf-8" indent="yes"/>


</xsl:stylesheet>

task.js

var gulp = require('gulp');
var xslt = require('gulp-xslt');

gulp.task('xsl', function() {
    gulp.src('./example.xml')
        .pipe(xslt('./template.xsl', {
            someVariable: '"someValue"', // string
            anotherVariable: '/foo/bar[@attr]' // xpath that will be evaluated
        }))
        .pipe(gulp.dest('./build/'));
});

Will produce: ./build/example.xml

<?xml version="1.0" encoding="utf-8"?>
<output attr="someValue">
    <bar attr="value">baz</bar>
</output>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].