Skip to content
Snippets Groups Projects
Commit fb66420f authored by David Maus's avatar David Maus
Browse files

Dublin Core für Titeldaten OPAC

parent a90b4f05
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,21 @@ switch ($format) {
}
$response = new Response('<h1>406 Not Acceptable</h1>', 406, array('Content-Type' => 'text/html'));
break;
case 'dc':
$type = (string)$record->getFirstMatchingField('002@/00')->getNthSubfield(0, '0');
if ($type[0] === 'T') {
$response = new Response('<h1>406 Not Acceptable</h1>', 406, array('Content-Type' => 'text/html'));
} else {
$templateUri = __DIR__ . '/../../../../src/xslt/mods2dc.xsl';
$sourceUri = sprintf(MODS_TEMPLATE, $ident);
$content = transform($sourceUri, $templateUri);
if ($content) {
$response = new Response($content, 200, array('Content-Type' => 'application/xml'));
break;
}
}
$response = new Response('<h1>406 Not Acceptable</h1>', 406, array('Content-Type' => 'text/html'));
break;
case 'rdf':
$type = (string)$record->getFirstMatchingField('002@/00')->getNthSubfield(0, '0');
if ($type[0] === 'T') {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment