Transform plugin

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-11 17:27:15

软件介绍

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

本文地址:https://codercto.com/soft/d/23162.html

文明之光 (第三册)

文明之光 (第三册)

吴军 / 人民邮电出版社 / 2015-1-1 / 59

【《文明之光》系列荣获由中宣部、中国图书评论学会和中央电视台联合推选的2014“中国好书”奖】 吴军博士从对人类文明产生了重大影响却在过去被忽略的历史故事里,选择了有意思的几十个片段特写,以人文和科技、经济结合的视角,有机地展现了一幅人类文明发展的宏大画卷。 《文明之光 》系列大致按照从地球诞生到近现代的顺序讲述了人类文明进程的各个阶段,每个章节相对独立,全景式地展现了人类文明发展历程......一起来看看 《文明之光 (第三册)》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

MD5 加密
MD5 加密

MD5 加密工具