Transform plugin
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/Transform
软件介绍
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"
});
$("#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
Hibernate
James Elliott / O'Reilly Media, Inc. / 2004-05-10 / USD 24.95
Do you enjoy writing software, except for the database code? Hibernate:A Developer's Notebook is for you. Database experts may enjoy fiddling with SQL, but you don't have to--the rest of the appl......一起来看看 《Hibernate》 这本书的介绍吧!
Base64 编码/解码
Base64 编码/解码
HEX CMYK 转换工具
HEX CMYK 互转工具
