load('mozbookmarks2wiki.xsl.xml'); // Create new XSLTProcessor $xslt = new XSLTProcessor(); // Load stylesheet $xslt->importStylesheet($xsl); // Load XML input file $xml = new DOMDocument(); $xml->load($filename); // Transform to a file $results = $xslt->transformToURI($xml, $filename2); if ($results) { wb_set_text(wb_get_control($window, IDC_STATIC1009), "Conversion successful: $filename2."); } else { wb_set_text(wb_get_control($window, IDC_STATIC1009), 'Error: conversion failed.'); } } break; case IDCLOSE: // IDCLOSE is predefined wb_destroy_window($window); break; } } ?>