function transformer($xmlC, $xslF) { //converting input string to UTF-8; $charTools = new CharTools(); $xmlinUTF8 = $charTools->eqStrCharset($xmlC); $xml = new DomDocument(); $xml->loadXML($xmlinUTF8); // indica o arquivo XSLT $xsl = new DomDocument(); $xsl->load($xslF); // cria o processador XSLT, carrega stylesheet e transforma o XML $proc = new XSLTProcessor(); $proc->importStyleSheet($xsl); return $proc->transformToXML($xml); }
<?php $_REQUEST = CharTools::eqStrCharsetFromArray($_REQUEST); $_POST = CharTools::eqStrCharsetFromArray($_POST); $_GET = CharTools::eqStrCharsetFromArray($_GET); $_COOKIE = CharTools::eqStrCharsetFromArray($_COOKIE); ?>