Skip to content

jvverde/XSLT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This jquery plugin is just a wrapper to XSLT Processor.

There are another excelente plugin (http://plugins.jquery.com/project/Transform) but the result 
is assumed to be HTML and always used as html content of instance element.

Our plugin instead of provide an instance method it provides a static method $.XSLTransform
which receives a object map as a parameter.
The map has the following keys
	xmlurl - The XML URL
	xslurl - The XML URL
	xmlstring - The XML as a string (only used if xmlurl is not present)
	xslstring - The XSL as a string (only used if xslurl is not present)
	params - a map of parameters to pass to the XSLT Processor
	

	Example:
		<script src="3rd-party/jquery/jquery.js" type="text/javascript" charset="UTF-8">  </script>
		<script type="text/javascript" src="XSLTransform.js" charset="UTF-8" > </script>

		<script type="text/javascript" charset="UTF-8">
			$(document).ready(function(){
			
					var $r = $.XSLTransform({
						xmlurl:'ex1.xml',
						xslurl:'ex1.xsl'
					});
					$('#body').html($r);
					
					var $r2 = $.XSLTransform({
						xmlstring:'<a><b><c>ccc</c></b></a>',
						xslurl:'ex1.xsl'
					});
					$('#body').append('<p>----------</p>').append($r2);

			});				
		</script>

About

jQueryWrapper for XSLT Processor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published