Transform plugin

未知
未知
2008-09-19

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

加载中

评论(0)

暂无评论

暂无资讯

暂无问答

聊聊flink DataStream的split操作

序 本文主要研究一下flink DataStream的split操作 实例 SplitStream<Integer> split = someDataStream.split(new OutputSelector<Integer>() { @Override public Iterable<String> select(I...

01/14 10:36
21
0
Css3 Transform 各种变形旋转

Css3 Transform 各种变形旋转 <!DOCTYPE html> <html> <head> <title> Css3 Transform 各种变形旋转</title> <style type="text/css"> *, *:after, *:before { box-sizing: border-box; } b...

2014/07/09 14:50
2.6K
0
纯css loadding效果

***原文地址: *** >https://blog.csdn.net/zuncle/article/details/62887308 html <h1> CSS LOADERS </h1> <div class="box"> loader-01 <div class="loader-01"> </div> </div> <div clas...

2018/10/30 09:52
14
0
CSS3(360度旋转、旋转放大、放大、移动)

效果一:360°旋转 修改rotate(旋转度数) * { transition:All 0.4s ease-in-out; -webkit-transition:All 0.4s ease-in-out; -moz-transition:All 0.4s ease-in-out; -o-transition:All 0.4...

2015/09/01 17:00
34
0
css 箭头

.game-Trend-shrink i{position: absolute; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 15px solid transparent; bottom...

2018/05/09 15:14
13
0
实现立方体旋转

HTML部分: <body class="body"> <div class="rect-wrap"> <!-- //舞台元素,设置perspective,让其子元素获得透视效果。 --> <div class="container"> <!-- //容器,设置transform-style: ...

2017/10/26 14:29
9
0
CSS实现3D旋转

<!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="utf-8" /> <title>E::before_CSS参考手册_web前端开发参考手册系列</title> <meta name="author" content="Joy Du(飘零雾雨), ...

2013/12/16 23:25
75
1
CSS3动画效果

渐隐渐显 @-webkit-keyframes cf3FadeInOut { 0% { opacity:1; } 20% { opacity:.8; } 50% { opacity:0.5; } 70%{ opacity: .3;} 100% { opacity:0; } } div.bg { -webkit-animation-name: c...

2015/06/17 20:46
160
0
动画-CGAffineTransform

CoreGraphics框架中的CGAffineTransform类可用于设定UIView的transform属性,控制视图的缩放、旋转和平移操作. transform 是一种状态,并且只有一种状态. UIView的transform属性是一个结构体...

2016/06/27 18:39
26
0
可以用CSS实现简单相册但是有些却必需要JS才能实现

一个简单的CSS相册 1. [代码]index.html 01 <div class="gallery"> 02 <a tabindex="1"><img src="images/1.jpg"></a> 03 <a tabindex="2"><img src="images/2.jpg"></a> 04 <a tabindex="3"...

2013/12/04 00:23
18
0

没有更多内容

加载失败,请刷新页面

返回顶部
顶部