Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
762 B

  1. // Get the command line params
  2. var args = WScript.Arguments;
  3. if(args.length != 3)
  4. {
  5. WScript.Echo( "Usage: transform <attr hht file> <xsl file> <output file>" );
  6. WScript.Quit( 10 );
  7. }
  8. // Load the XML
  9. var source = new ActiveXObject( "Microsoft.XMLDOM" );
  10. source.async = false;
  11. source.load(args(0));
  12. // Load the XSL
  13. var style = new ActiveXObject( "Microsoft.XMLDOM" );
  14. style.async = false;
  15. style.load(args(1));
  16. // create the file to store the results
  17. var fso = new ActiveXObject("Scripting.FileSystemObject");
  18. fso.CreateTextFile(args(2));
  19. var file = fso.GetFile(args(2));
  20. var ts = file.OpenAsTextStream(2, -1);
  21. ts.Write( "<?xml version=\"1.0\" encoding=\"UTF-16\" ?>" );
  22. ts.Write( source.transformNode(style) );
  23. ts.Close( );