Browse Source

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

pull/126/head
Adam Vessey 13 years ago committed by Adam Vessey
parent
commit
373c390a87
  1. 11
      ObjectHelper.inc

11
ObjectHelper.inc

@ -407,6 +407,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($xsl);
return $transform->transformToXML($ds);
}
else {
$simplexml = new SimpleXMLElement($xmlstr); $simplexml = new SimpleXMLElement($xmlstr);
$headers = array( $headers = array(
@ -422,7 +430,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 {
@ -452,6 +460,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