\n" . "\tv2\n" . $this->formatElement('id', $record->url) . $this->formatElement('entry', $record->datestamp) . $this->formatElement('organization', $this->getLocalizedData($record->publishers, $record->primaryLocale)) . $this->formatElement('organization', $this->getLocalizedData($record->sources, $record->primaryLocale)) . $this->formatElement('title', $this->getLocalizedData($record->titles, $record->primaryLocale)) . $this->formatElement('type', $this->getLocalizedData($record->types, $record->primaryLocale)) . $this->formatElement('type', $record->relation) . $this->formatElement('author', $record->creator) . $this->formatElement('date', $record->date) . $this->formatElement('copyright', $record->rights) . $this->formatElement('other_access', 'url:' . $record->url) . $this->formatElement('keyword', $this->getLocalizedData($record->subjects, $record->primaryLocale)) . $this->formatElement('period', $record->coverage) . $this->formatElement('monitoring', $this->getLocalizedData($record->contributors, $record->primaryLocale)) . $this->formatElement('language', $record->language) . $this->formatElement('abstract', $this->getLocalizedData($record->descriptions, $record->primaryLocale)) . "\n"; return $response; } /** * Format XML for single RFC 1807 element. * @param $name string * @param $value mixed */ function formatElement($name, $value) { if (!is_array($value)) { $value = array($value); } $response = ''; foreach ($value as $v) { $response .= "\t<$name>" . $this->oai->prepOutput($v) . "\n"; } return $response; } } ?>