'; $xml .= "\n\n"; foreach ($results as $rec ){ $xml .= "\n"; switch ($rec->biblio_type) { case 1: $reftype = 0; case 102: $reftype = 0; break; // journal case 2: // 2,3 and 4 case 3: // are all case 4: // are all case 103: $reftype = 3; break; // conference proceedings case 5: case 109: $reftype = 10; break; // report case 5: case 100: $reftype = 7; break; // book section case 7: case 108: $reftype = 2; break; // thesis case 8: case 119: $reftype = 15; break; // patent case 9: case 129: default: $reftype = 31; break; // generic } $xml .= "\t$reftype\n"; $xml .= "\t\n"; $author_array = explode(";", $rec->biblio_authors); foreach($author_array as $auth) { $xml .= "\t\t".trim($auth)."\n"; } $xml .= "\t\n"; $xml .= (!empty($rec->biblio_year))?"\t$rec->biblio_year\n":""; $xml .= (!empty($rec->title))?"\t$rec->title\n":""; if (!empty($rec->biblio_secondary_authors)) { $xml .= "\t\n"; $author_array = explode(";", $rec->biblio_secondary_authors); foreach($author_array as $auth) { $xml .= "\t\t".utf8_decode(trim($auth))."\n"; } $xml .= "\t\n"; } $xml .= (!empty($rec->biblio_secondary_title))?"\t". htmlentities($rec->biblio_secondary_title) ."\n":""; $xml .= (!empty($rec->biblio_place_published))?"\t". htmlentities($rec->biblio_place_published) ."\n":""; $xml .= (!empty($rec->biblio_publisher))?"\t". htmlentities($rec->biblio_publisher) ."\n":""; $xml .= (!empty($rec->biblio_volume))?"\t$rec->biblio_volume\n":""; // number of volumes $xml .= (!empty($rec->biblio_issue))?"\t$rec->biblio_issue\n":""; $xml .= (!empty($rec->biblio_pages))?"\t$rec->biblio_pages\n":""; //
section
if (!empty($rec->biblio_tertiary_authors)) { $xml .= "\t\n"; $author_array = explode(";", $rec->biblio_tertiary_authors); foreach($author_array as $auth) { $xml .= "\t\t".trim($auth)."\n"; } $xml .= "\t\n"; } $xml .= (!empty($rec->biblio_tertiary_title))?"\t$rec->biblio_tertiary_title\n":""; $xml .= (!empty($rec->biblio_edition))?"\t$rec->biblio_edition\n":""; $xml .= (!empty($rec->biblio_date))?"\t$rec->biblio_date\n":""; // type of work // // lastname1, firstname1 // lastname2, firstname2 // // short title // alternate title $xml .= (!empty($rec->biblio_isbn))?"\t$rec->biblio_isbn\n":""; // original publication // reprint edition // reviewed item // custom 1 // custom 2 // custom 3 // custom 4 // custom 5 // custom 6 $xml .= (!empty($rec->biblio_accession_number))?"\t$rec->biblio_accession_number\n":""; $xml .= (!empty($rec->biblio_call_number))?"\t$rec->biblio_call_number\n":""; // if (!empty($rec->biblio_keywords)) { $xml .= "\t\n"; $splitchar = (strstr($rec->biblio_keywords, ";"))?";":" "; $kw_array = explode($splitchar, $rec->biblio_keywords); foreach($kw_array as $kw) { $xml .= "\t\t".trim($kw)."\n"; } $xml .="\t\n"; } $xml .= (!empty($rec->biblio_abst_e))?"\t". htmlentities($rec->biblio_abst_e) ."\n":""; $xml .= (!empty($rec->biblio_notes))?"\t$rec->biblio_notes\n":""; $xml .= (!empty($rec->biblio_url))?"\t". htmlentities($rec->biblio_url) ."\n":""; // author address // caption $xml .= "
\n"; } //end while $xml .= "
"; return $xml; }