function normalize_enclosure(&$source, $from, &$dest, $to, $i)
{
$id_from = $this->element_id($from, $i);
$id_to = $this->element_id($to, $i);
if (isset($source["{$id_from}@"])) {
foreach (explode(',', $source["{$id_from}@"]) as $attr) {
if ($from == 'link_enclosure' and $attr == 'href') {
// from Atom
$dest["{$id_to}@url"] = $source["{$id_from}@{$attr}"];
$dest["{$id_to}"] = $source["{$id_from}@{$attr}"];
} elseif ($from == 'enclosure' and $attr == 'url') {
// from RSS
$dest["{$id_to}@href"] = $source["{$id_from}@{$attr}"];
$dest["{$id_to}"] = $source["{$id_from}@{$attr}"];
} else {
$dest["{$id_to}@{$attr}"] = $source["{$id_from}@{$attr}"];
}
}
}
}