$v)
$ret += (ord($v) % 128) * pow(64, $k);
return "$ret;";
}
function removeSpecialChars ($data) {
global $specialcharsfrom, $specialcharsto;
# echo "".$data."";
$cheese = str_replace($specialcharsfrom, $specialcharsto, $data);
return $cheese;
}
//Initialize the XML parser
$messenger = new XMLReader();
$messenger->open ($xmlfilename);
$counter = 0;
while ($messenger->read()) {
switch ($messenger->name) {
case "Root":
$currentNumber = $messenger->getAttribute("Volume");
$dat = $messenger->getAttribute("Date");
$type = $messenger->nodeType;
# 1: element, 15: end element!
if ($type == 1) $msg_out .= "
".$page[$counter];
/* only for this edition !!! */
if (!$currentPdf[$counter]) $currentPdf[$counter] = $page[$counter];
if ($currentPdf[$counter] && $showpdflinks) {
$msg_out .=" (
PDF)";
}
# Authors: has to work with several
tags as well, so join them...
$a_authors = array ();
if ($authors[$counter]) {
foreach ($authors[$counter] as $autoren) {
# echo $autoren;
$a_authors = array_merge ($a_authors, explode(", ", $autoren));
}
}
# clean empty items
foreach ($a_authors as $i => $author) {
if (empty($author)) unset($a_authors[$i]);
}
# $temp = preg_split("/[0-9][,]?[0-9]?[ |\n]/", $authors);
# print_r ($a_authors);
$number_of_authors = count($a_authors);
# echo "
"; #.$number_of_authors."
";
if ($number_of_authors > 3) {
$a_authors = array_slice($a_authors,0,2);
$b_authors[$counter] = implode(", ",$a_authors)." et al.";
} else {
$b_authors[$counter] = implode(", ",$a_authors);
}
# print_r($a_authors);
# echo $b_authors[$counter]." (".$counter.")
";
# no authors?
if (!$b_authors[$counter]) $b_authors[$counter] = "ESO";
$msg_out .="".$b_authors[$counter]."
".join(' ',$title[$counter])."
\n";
if ($abstract[$counter]) {
$msg_out .= "