header('Content-type: application/xml'); echo "{$noparam}"; return; } // instantiate new Picappn() $pica = new Picappn(); // set PPN as identifier $pica->setPpn($id); /* * This is no part of the unAPI but for debugging. * It is triggered by supplying "array" as $format and print_rs the * pica-data as array. */ if ($format == "array") { echo "<head></head>\n<body>\n <pre>\n"; print_r($pica->getArray()); echo " </pre>\n</body>\n"; die(0); } // Final switch for printing result according to $format switch ($format) { // BibTeX case 'bibtex': $res = $pica->getBibTex(); final_result($res, 'text/plain'); break; // CSV // CSV case 'csv': $res = $pica->getCsv(); final_result($res, 'text/plain');