function iniWrite($xml, $xsl_params = null) { global $debug, $xmlSave; $sucess = false; $xsl = "../xsl/adm/xml-ini.xsl"; $ini = str_replace(array("xml/", ".xml"), array("ini/", ".ini"), $xmlSave); //print "\n xsl=" . $xsl . " ini=" . $ini . "<br>"; $text = processTransformation($xml, $xsl, $xsl_params); $text = xmlRemoveHeader($text); $text = trim($text); if ($text == "subpages not present in this component") { return $sucess; } else { if ($text == "") { print "warning:transformation error generated empty content"; } else { //$iniFile = normalizeDocURL($ini); $iniFile = DATABASE_PATH . $ini; if (!putDoc($iniFile, $text)) { print "putDoc error: " . $iniFile . "<br/>\n"; } else { $sucess = true; } } } return $sucess; }
function BVSDocXml($rootElement, $xml) { $content = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"; $content .= "<" . $rootElement . ">\n"; $content .= xmlHttpInfo("http-info"); $content .= xmlDefineInfo("define"); if (isset($xml)) { //verifica se a variavel é um xml ou arquivo if (strncasecmp($xml, "<?xml", 5) == 0) { $content .= xmlRemoveHeader($xml); } else { $content .= getXmlDoc($xml, true); } } $content .= "</" . $rootElement . ">\n"; return $content; }