5) {$processor = new XSLTProcessor; $xsl = new DOMDocument;} if($ID_Schema == 1) { if ($version > 5) { $xsl->load('XSLT/en_ABCD1.2_Summary.xslt');} else {$xsl = file_get_contents('XSLT/en_ABCD1.2_Summary_php4.xslt');} } if($ID_Schema == 2) { if ($version > 5) { $xsl->load('XSLT/en_ABCD2.0_Summary.xslt');} else {$xsl = file_get_contents('XSLT/en_ABCD2.0_Summary_php4.xslt');} } if($ID_Schema == 3 OR $ID_Schema == 6) { if ($version > 5) { $xsl->load('XSLT/en_DarwinCore_UnitDetail.xslt');} else {$xsl = file_get_contents('XSLT/en_DarwinCore_UnitDetail.xslt');} } if($ID_Schema == 4) { if ($version > 5) { $xsl->load('XSLT/en_ABCD2.05_Summary.xslt');} else {$xsl = file_get_contents('XSLT/en_ABCD2.05_Summary_php4.xslt');} } $inf = parse_url($Provider); $host = $inf['host']; $path = $inf['path']; if (isset($inf['query'])) $path .= '?'.$inf['query']; if (isset($inf['port'])) $port = $inf['port']; else $port = 80; if($Provider) { error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE); $fp = fsockopen($host, $port, $errno, $error, 5); if(!$fp or !$host) { echo "Verbindungstest fehlgeschlagen, Gegenstelle antwortet nicht! Bitte setzen Sie sich mit dem Administrator in Verbindung."; } if($fp and $host) { if ($version < 5) {$xml = file_get_contents($file); $xh=xslt_create(); $html = xslt_process($xh,'arg:/_xml','arg:/_xsl',null, array('/_xml'=>$xml,'/_xsl'=>$xsl), array('myparam'=>'My parameter value'));} if ($version > 5) { $processor->importStyleSheet($xsl); $xml = new DOMDocument; $xml->load($file); $html = $processor->transformToXML($xml); } echo utf8_decode($html); } } ?>