':'); try { $client = new SoapClient(DD_WSDL); } catch (SoapFault $exception) { $msg = $exception->faultstring.PHP_EOL; exit($msg); } // Transform to HTML $xsl = new DomDocument("1.0"); $xsl->load(XMLPATH.'orbitsInfo.xsl'); $xslt = new XSLTProcessor(); $xslt->importStylesheet($xsl); $targetXml = simplexml_load_file(SimuTargetsXml); $targets = $targetXml->Target; foreach ($targets as $target) { if (!file_exists(RemoteData."$target.json")) exit("ERROR : NO $target.json FILE !!! Run makeOrbitsArgs.php".PHP_EOL); $infoFileName = "simu$target"; $infoDom = new DomDocument("1.0"); $root = $infoDom->createElement('target'); $root->setAttribute('name', $target); $infoDom->appendChild($root); $orbits = json_decode(file_get_contents(RemoteData.$target.'.json'), true); foreach ($orbits as $missionGroup => $missions) { $missionGrpNode = $infoDom->createElement('missionGroup'); $missionGrpNode->setAttribute('name', $missionGroup); $root->appendChild($missionGrpNode); foreach ($missions as $missionName => $mission) { $missionNode = $infoDom->createElement('mission'); $missionNode->setAttribute('name', $missionName); $missionGrpNode->appendChild($missionNode); foreach ($mission as $ds => $param) { try { $res = $client->getStartStop(strtr($ds,$tr)); $Time = explode("-",$res); $StartTime = days2MonthDay($Time[0]); $StopTime = days2MonthDay($Time[1]); $missionNode->appendChild($infoDom->createElement('start',$StartTime)); $missionNode->appendChild($infoDom->createElement('stop',$StopTime)); } catch (SoapFault $exception) { $msg = $exception->faultstring.PHP_EOL; exit($msg); } } } } // $infoDom->save($infoFileName.".xml"); $xslt->transformToURI($infoDom, 'file://'.HELPPATH.'simu/'.$infoFileName); } ?>