
function transform (xslFileName) {
    // Get the XML input data
    var xmlhttp = new XMLHttpRequest();
    xmlhttp.open("GET", "channel.xml", false);
    xmlhttp.send('');
    
    // Get the XSLT file
    var xslhttp = new XMLHttpRequest();
    xslhttp.open("GET", xslFileName, false);
    xslhttp.send('');
    
    // Transform the XML via the XSLT
    var processor = new XSLTProcessor();
    processor.importStylesheet(xslhttp.responseXML);
    var newDocument = processor.transformToDocument(xmlhttp.responseXML);

    // Replace part of original document with the new content
    var o = document.getElementById("planet");
    var n = newDocument.getElementById("planet");
    o.parentNode.replaceChild(n, o);
}
