<?xml version="1.0" encoding="utf-8"?><t:transform version="1.0" xmlns:t="http://www.w3.org/1999/XSL/Transform" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:e="urn:extension" exclude-result-prefixes="ms e"><ms:script language="JScript" implements-prefix="e"><![CDATA[

  var FSO = new ActiveXObject('Scripting.FileSystemObject');

  function repeat(s,count) {
    var result = '';
    for(var i=0; i<count; ++i) result += s;
    return result;
  }

  var Log = '';

  function log(type, message) {
    type = type.charAt(0).toUpperCase() + type.substring(1).toLowerCase();
    var prefix = (type ? '['+type+'] ' : '');
    var s = prefix + message;
    if (prefix != '') {
      var linebreak = '\n'+repeat(' ',prefix.length);
      s = s.replace(/\n\ */g,linebreak);
    }
    Log += s + '\r\n\r\n';
    return true;
  }

  function saveLog(fileName){
    var file = FSO.createTextFile(fileName, true, true);
    file.write(Log);
    file.close();
    return true;
  }

]]></ms:script></t:transform>