Transform plugin

授权协议 未知
开发语言
所属分类 jQuery 插件、 其他jQuery插件
软件类型 开源软件
地区 不详
投 递 者 薛祯
操作系统 未知
开源组织
适用人群 未知
 软件概览

The Transform plugin enables users to easily make cross-browser XML transformations with XSL. The plugin does not rely on additional libraries and utilizes all ajax options. Very flexible and easy to use.

Transform features include:

  • Asynchronous or non-asynchronous calls
  • Multiple asynchronous transformations at once
  • Pass an object or html for a loading message
  • Automatically transform by providing a custom transform attribute to the element
  • Now supports all ajax options such as beforeSend
  • Request data from URL or pass as string
  • Works with xsl:import and xsl:include
  • Pass custom parameter values to XSL and callback functions
  • Custom handlers for 'success', 'error', and 'complete'
  • Non-asynchronous calls return transformed HTML
  • Option to append XML and XSL as a data island
  • Works with selectors
  • No ActiveX objects
  • No web server required. An unintentional result, but most features run from the desktop
  • Tested in IE6+, Firefox2+, Opera 9, Safari 3, Netscape 8, and Flock

Examples: - More available in download

//Simple request for element with id="result"
$("#result").transform({xml:"file.xml",xsl:"file.xsl"});
-or-
$.transform({el:"#result",xml:"file.xml",xsl:"file.xsl"});

//With XSL parameter
$("#result").transform({
    xslParams:{name:"value"},
    xml:"file.xml",xsl:"file.xsl"
});

//Non-async returns HTML
var html = $.transform({async:false,xml:"file.xml",xsl:"file.xsl"});

//Custom handlers
$("#result").transform({
    success:someFunc,error:someFunc,complete:someFunc,
    xml:"file.xml",xsl:"file.xsl"
});

//Pass XML and XSL as string
$("#result").transform({xslstr:[xsl string], xmlstr:[xml string]});

//Use transform attribute to transform on load with msg
<div transform='{xml:"file.xml",xsl:"file.xsl",msg:$("#loadingmsg")}'></div>

//Request xml from web service by using an ajax object for the xml instead of file name
$("#result").transform({
    xml:{
        url:"service.asmx/AddTogether",
        data:{
            y:$("#y").val(),
            x:$("#x").val()
        },
        type:"POST",
        dataType:"xml"
    },
    xsl:"xsl/service.xsl"
});


Post your thoughts:
Any thoughts on the plugin are greatly appreciated. You can post them here

  • 前言 前面我们用了一篇很长的文章介绍了@babel/preset-env,感兴趣的可以去看我之前的一篇文章babel源码解析之(@babel/preset-env),今天我们要分析的是babel的一个插件,叫@babel/plugin-transform-runtime. 简介 我们看一下官网对它的描述: A plugin that enables the re-use of Babel’s in

  • 本文主要讲解@babel/plugin-transform-runtime以及@babel/runtime的作用 一,@babel/plugin-transform-runtime的api转换功能 在上一篇文章中,已经体现出了它的第一个作用,就是把babel语法转化过程中的辅助函数删除,然后使用@babel/runtime库中的辅助函数引入的方式使用。 其实它还有其他作用,以下三点是它的主要作用:

  • 原文链接: cjs 转 esm 使用 babel插件 babel-plugin-transform-commonjs 上一篇: vite 尝试和入门 下一篇: airtest IDE 编写 明日方舟 刷钱脚本 主要目的为将cjs文件转换为esm的形式 https://www.npmjs.com/package/babel-plugin-transform-commonjs 需要转化的文件index

  • 插件的作用: 在项目 build 阶段把所有的 console 移除掉 插件的使用: 1、插件安装 npm install babel-plugin-transform-remove-console --save-dev 2、声明插件,打开项目中 babel.config.js 文件 "plugins": [ "transform-remove-console" ] 3、重新运行 build

  • ERROR in ./src/main.js Module build failed (from ./node_modules/_babel-loader@7.1.5@babel-loader/lib/index.js): ReferenceError: Unknown plugin "transform-runtime" specified in "D:\\vuelearn\\VueLearn\

  • @babel_plugin-transform-runtime重复引入问题 在webpack中,将高级API转换依赖于babel插件 @babel/plugin-transform-runtime; 但是在配置好之后发现打包后的文件还是有重复引入问题,也是这个插件没有起到减少代码冗余的问题 // 原来的配置 { test: /\.js$/, use: { loader: 'babe

  • 目前部分浏览器和 Node.Js 已经支持 ES6,但是对 ES6 所有的标准支持不全,这导致在开发中不敢全面地使用 ES6。 通常我们需要把采用 ES6 编写的代码转换成目前已经支持良好的 ES5 代码。 把新的 ES6 语法用 ES5 实现,例如 ES6 的 class 语法用 ES5 的 prototype 实现。 给新的 API 注入 polyfill ,例如项目使用 fetch API

  • 1.安装依赖包 babel-plugin-transform-remove-console; npm install babel-plugin-transform-remove-console --save-dev 2.在vue项目根目录下新建 babel.config.js,做相关配置; const prodPlugins = []; // 判断当前环境是否为生产环境 如果是生产环境把trans