topical media & game development
basic-ajax-08-FFTransform.js / js
function Transform()
{
var xsltProcessor = new XSLTProcessor();
//Load XSL
xslStylesheet = document.implementation.createDocument("", "doc", null);
xslStylesheet.async = false;
xslStylesheet.load("Example.xsl");
xsltProcessor.importStylesheet(xslStylesheet);
//Load XML
xmlDoc = document.implementation.createDocument("", "doc", null);
xmlDoc.async = false;
xmlDoc.load("Example.xml");
//Transform
var fragment = xsltProcessor.transformToFragment(xmlDoc, document);
document.getElementById("example").appendChild(fragment);
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.