Browse Source

Try to use covertQDC.xsl before using the Drupal's table generating business.

pull/101/head
Adam Vessey 13 years ago
parent
commit
2ac5ad45c7
  1. 11
      ObjectHelper.inc

11
ObjectHelper.inc

@ -429,6 +429,14 @@ class ObjectHelper {
return ''; return '';
} }
if (($xsl_path = "$path/xsl/convertQDC.xsl") &&
($xsl = DOMDocument::load($xsl_path)) &&
($ds = DOMDocument::loadXML($xmlstr))) {
$transform = new XSLTProcessor();
$transform->importStylesheet($domdoc);
return $transform->transformToHTML($ds);
}
else {
$simplexml = new SimpleXMLElement($xmlstr); $simplexml = new SimpleXMLElement($xmlstr);
$headers = array( $headers = array(
@ -444,7 +452,7 @@ class ObjectHelper {
$rendered_data = ''; $rendered_data = '';
if ($grand_children = $child->children()) { if ($grand_children = $child->children()) {
foreach($grand_children as $grand_child) { foreach($grand_children as $grand_child) {
$data[] = $grand_child->tagName() . ' = ' . (string)$grand_child; $data[] = $grand_child->getName() . ' = ' . (string)$grand_child;
} }
} }
else { else {
@ -474,6 +482,7 @@ class ObjectHelper {
return theme('table', $headers, $rows, array('class' => 'dc-table')); return theme('table', $headers, $rows, array('class' => 'dc-table'));
} }
}
/** /**
* Queries fedora for what we call the qualified dublin core. Currently only dc.coverage has * Queries fedora for what we call the qualified dublin core. Currently only dc.coverage has

Loading…
Cancel
Save