Browse Source

Merge pull request #7 from bwoodhead/6.x

ISLANDORA-260 Bugfix
pull/8/merge
Ben Woodhead 13 years ago
parent
commit
1fb0e07e62
  1. 5
      CollectionClass.inc
  2. 15
      CollectionPolicy.inc
  3. 57
      ContentModel.inc
  4. 2
      MimeClass.inc
  5. 10
      ObjectHelper.inc
  6. 6
      SearchClass.inc
  7. 13
      XMLDatastream.inc
  8. 2
      api/fedora_collection.inc
  9. 54
      api/fedora_export.inc
  10. 30
      api/fedora_item.inc
  11. 8
      api/fedora_utils.inc
  12. 1
      api/rels-ext.inc
  13. 2
      api/tagging.inc
  14. 1
      collection_policies/COLLECTION-COLLECTION POLICY.xml
  15. 25
      collection_policies/PDF-COLLECTION POLICY.xml
  16. 1
      collection_policies/PERSONAL-COLLECTION-POLICY.xml
  17. 1
      collection_policies/book_collection_policy.xml
  18. 39
      collection_policies/qt_collection_policy.xml
  19. 1
      collection_policy.xsd
  20. 7
      collection_views/Coverflow_Collection_View.xsl
  21. 7
      collection_views/Coverflow_PRE_Collection_View.xsl
  22. 143
      collection_views/FLV-COLLECTION VIEW(2).xml
  23. 131
      collection_views/REFWORKS-COLLECTION_VIEW.xml
  24. 145
      collection_views/SIMPLE-COLLECTION_VIEW.xml
  25. 4
      collection_views/SmileyStuff-COLLECTION_VIEW.xml
  26. 4
      collection_views/Video-COLLECTION_VIEW.xml
  27. 125
      collection_views/default-sparqltoHtml.xsl
  28. 4
      collection_views/simple_list_view.xml
  29. 4
      collection_views/standard_jpeg_collection_view.xml
  30. 88
      collection_views/yui_coverflow/js/CoverFlow.js
  31. 75
      collection_views/yui_coverflow/js/test.js
  32. 1
      content_models/COLLECTIONCM.xml
  33. 1
      content_models/FAS_slideCModel.xml
  34. 33
      content_models/STANDARD_QT.xml
  35. 1
      content_models/STRICT_PDFCM.xml
  36. 15
      content_models/ilives_tei2htmlSdep-pageCModel.xml
  37. 20
      content_models/islandora_mods2htmlSdep.xml
  38. 33
      content_models/islandora_qtCModel.xml
  39. 146
      example_collection_views/MHL-sparqltoHtml.xsl
  40. 95
      example_collection_views/critter.xsl
  41. 143
      example_collection_views/flv-sparqltoHtml.xsl
  42. 139
      example_collection_views/mlp-sparqltoHtml.xsl
  43. 174
      example_collection_views/refworks.xsl
  44. 148
      example_collection_views/riri-sparqltoHtml.xsl
  45. 125
      example_collection_views/sparqltoHtml.xsl
  46. 3
      fedora_repository.install
  47. 69
      fedora_repository.module
  48. 11
      fedora_repository.solutionpacks.inc
  49. 17
      formClass.inc
  50. 5
      ilives/book.inc
  51. 3
      ilives/fedora_ilives.install
  52. 2
      ilives/fedora_ilives.module
  53. 13
      ilives/image_rotator_tagger_block.inc
  54. 11
      ilives/tests/fedora_ilives.test
  55. 3
      ilives/xml/ilives_CollectionModel.xml
  56. 15
      ilives/xml/ilives_tei2htmlSdep-pageCModel.xml
  57. 9
      ilives/xsl/MODS3-22simpleDC.xsl
  58. 163
      ilives/xsl/book_view.xsl
  59. 13
      ilives/xsl/pageResults.xsl
  60. 105
      ilives/xsl/results.xsl
  61. 1
      islandoracm.xsd
  62. 4
      js/AC_Quicktime.js
  63. 13
      js/printer_tool.js
  64. 51
      js/swfobject.js
  65. 1
      plugins/CollectionFormBuilder.inc
  66. 6
      plugins/DarwinCore.inc
  67. 1
      plugins/DemoFormBuilder.inc
  68. 7
      plugins/DocumentConverter.inc
  69. 6
      plugins/Ffmpeg.inc
  70. 2
      plugins/FlvFormBuilder.inc
  71. 6
      plugins/FormBuilder.inc
  72. 9
      plugins/ModsFormBuilder.inc
  73. 4
      plugins/PersonalCollectionClass.inc
  74. 4
      plugins/Refworks.inc
  75. 2
      plugins/ShowDemoStreamsInFieldSets.inc
  76. 10
      plugins/fedora_attach/fedora_attach.admin.inc
  77. 2
      plugins/fedora_attach/fedora_attach.install
  78. 16
      plugins/fedora_attach/fedora_attach.module
  79. 10
      plugins/fedora_imageapi.module
  80. 20
      plugins/herbarium.inc
  81. 7
      plugins/islandora_newspaper/Newspaper.inc
  82. 1
      plugins/islandora_newspaper/newspapers_collection_policy.xml
  83. 3
      plugins/islandora_newspaper/newspapers_guardian.xml
  84. 1
      plugins/islandora_newspaper/newspapers_issueCModel_islandoracm.xml
  85. 3
      plugins/pidfield/pidfield.install
  86. 10
      plugins/pidfield/pidfield.module
  87. 26
      plugins/qt_viewer.inc
  88. 5
      tests/fedora_repository.test
  89. 95
      xsl/advanced_search_results.xsl
  90. 541
      xsl/browseIndexToResultPage.xslt
  91. 34
      xsl/convertQDC.xsl
  92. 174
      xsl/refworks.xsl
  93. 75
      xsl/romeo.xsl
  94. 162
      xsl/sparql_to_html.xsl
  95. 165
      xsl/specdwc.xsl

5
CollectionClass.inc

@ -1,6 +1,5 @@
<?php
// $Id$
/**
* @file
@ -321,7 +320,7 @@ class CollectionClass {
$thisClass = new $phpClass ();
$returnValue = $thisClass->$phpMethod($parametersArray, $dsid, $file, $file_ext);
if (!$returnValue) {
drupal_set_message('Error! Failed running content model method !m !rv', array('!m' => $phpMethod, '!rv' => $returnValue));
drupal_set_message(t('Error! Failed running content model method !m !rv'), array('!m' => $phpMethod, '!rv' => $returnValue));
return FALSE;
}
}
@ -435,7 +434,7 @@ class CollectionClass {
module_load_include('inc', 'fedora_repository', 'plugins/PersonalCollectionClass');
$personalCollectionClass = new PersonalCollectionClass();
if (!$personalCollectionClass->createCollection($user, $pid, $soapClient)) {
drupal_set_message("Did not create a personal collection object for !u", array('!u' => $user->name));
drupal_set_message(t("Did not create a personal collection object for !u"), array('!u' => $user->name));
return FALSE; //creation failed don't save the collection pid in drupal db
}
user_save($user, $personal_collection_pid);

15
CollectionPolicy.inc

@ -1,7 +1,5 @@
<?php
// $Id$
/**
* @file
* Collection Policy Class
@ -41,7 +39,7 @@ class CollectionPolicy extends XMLDatastream {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
try {
if (self::validPid($pid)) {
if (self::valid_pid($pid)) {
$dsid = CollectionPolicy::getDefaultDSID();
if ($preFetch) {
@ -49,7 +47,7 @@ class CollectionPolicy extends XMLDatastream {
$ds = $fedoraItem->get_datastream_dissemination($dsid);
}
else {
$ds = null;
$ds = NULL;
}
}
@ -364,7 +362,7 @@ class CollectionPolicy extends XMLDatastream {
*/
public function getNextPid($dsid) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) {
if (self::valid_dsid($dsid) && $this->validate()) {
$content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model');
$namespace = FALSE;
for ($i = 0; $namespace === FALSE && $i < $content_models->length; $i++) {
@ -393,7 +391,10 @@ class CollectionPolicy extends XMLDatastream {
$ret = array();
$content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model');
for ($i = 0; $i < $content_models->length; $i++) {
$cm = ContentModel::loadFromModel($content_models->item($i)->getAttribute('pid'), $content_models->item($i)->getAttribute('dsid'), $content_models->item($i)->getAttribute('namespace'), $content_models->item($i)->getAttribute('name'));
$cm = ContentModel::loadFromModel($content_models->item($i)->getAttribute('pid'),
$content_models->item($i)->getAttribute('dsid'),
$content_models->item($i)->getAttribute('namespace'),
$content_models->item($i)->getAttribute('name'));
if ($cm !== FALSE) {
$ret[] = $cm;
}
@ -583,7 +584,7 @@ class CollectionPolicy extends XMLDatastream {
*/
function addModel($cm, $namespace) {
$ret = FALSE;
if (self::validPid($namespace) && $this->validate() && $cm->validate()) {
if (self::valid_pid($namespace) && $this->validate() && $cm->validate()) {
$contentmodelsEl = $this->xml->getElementsByTagName('content_models');
$models = $contentmodelsEl->item(0)->getElementsByTagName('content_model');
$found = FALSE;

57
ContentModel.inc

@ -1,6 +1,9 @@
<?php
// $Id$
/**
* @file
*
*/
/**
* @file
@ -38,7 +41,7 @@ class ContentModel extends XMLDatastream {
*/
public static function loadFromObject($pid) {
$ret = FALSE;
if (self::validPid($pid)) {
if (self::valid_pid($pid)) {
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$objectHelper = new ObjectHelper();
@ -199,9 +202,9 @@ class ContentModel extends XMLDatastream {
$ret = FALSE;
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
try {
if (self::validPid($pid)) {
if (self::valid_pid($pid)) {
$fedoraItem = new Fedora_Item($pid);
$dsid = ($dsid != NULL && self::validDsid($dsid)) ? $dsid : ContentModel::getDefaultDSID();
$dsid = ($dsid != NULL && self::valid_dsid($dsid)) ? $dsid : ContentModel::getDefaultDSID();
$ds = $fedoraItem->get_datastream_dissemination($dsid);
if (!empty($ds)) {
$ret = new ContentModel($ds, $pid, $dsid, $pid_namespace, $name);
@ -475,7 +478,7 @@ class ContentModel extends XMLDatastream {
*/
private function getDSModel($dsid) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) {
if (self::valid_dsid($dsid) && $this->validate()) {
$result = $this->xml->getElementsByTagName('datastreams');
if ($result->length > 0) {
$result = $result->item(0)->getElementsByTagName('datastream');
@ -586,23 +589,23 @@ class ContentModel extends XMLDatastream {
$elementsEl = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0);
$elements = $elementsEl->getElementsByTagName('element');
$found = FALSE;
$refEl = FALSE;
$ref_el = FALSE;
for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
if ($elements->item($i)->getAttribute('name') == trim($name)) {
if ($reorder == 'inc') {
$found = $elements->item($i);
$refEl = ($i > 0) ? $elements->item($i - 1) : false;
$ref_el = ($i > 0) ? $elements->item($i - 1) : FALSE;
}
else {
$found = ($i + 1 < $elements->length) ? $elements->item($i + 1) : FALSE;
$refEl = $elements->item($i);
$ref_el = $elements->item($i);
}
}
}
if ($found !== FALSE) {
$elementsEl->removeChild($found);
$elementsEl->insertBefore($found, $refEl);
$elementsEl->insertBefore($found, $ref_el);
$ret = TRUE;
}
}
@ -874,23 +877,23 @@ class ContentModel extends XMLDatastream {
$items = $authListEl->getElementsByTagName('item');
$found = FALSE;
$refEl = FALSE;
$ref_el = FALSE;
for ($i = 0; $found === FALSE && $i < $items->length; $i++) {
if ($items->item($i)->nodeValue == $value) {
if ($reorder == 'inc') {
$refEl = ($i > 0) ? $items->item($i - 1) : FALSE;
$ref_el = ($i > 0) ? $items->item($i - 1) : FALSE;
$found = $items->item($i);
}
else {
$refEl = $items->item($i);
$ref_el = $items->item($i);
$found = ($i + 1 < $items->length) ? $items->item($i + 1) : FALSE;
}
}
}
if ($found !== FALSE && $refEl !== FALSE) {
if ($found !== FALSE && $ref_el !== FALSE) {
$authListEl->removeChild($found);
$authListEl->insertBefore($found, $refEl);
$authListEl->insertBefore($found, $ref_el);
$ret = TRUE;
}
}
@ -1084,7 +1087,7 @@ class ContentModel extends XMLDatastream {
*/
public function buildEditMetadataForm($pid, $dsid) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) {
if (self::valid_dsid($dsid) && $this->validate()) {
$method = $this->xml->getElementsByTagName('edit_metadata_method');
if ($method->length > 0 && $method->item(0)->getAttribute('dsid') == $dsid) {
$method = $method->item(0);
@ -1218,7 +1221,7 @@ class ContentModel extends XMLDatastream {
*/
public function updateEditMetadataMethod($module, $file, $class, $method, $handler, $dsid) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) {
if (self::valid_dsid($dsid) && $this->validate()) {
$methodEl = $this->xml->getElementsByTagName('content_model')->item(0)->getElementsByTagName('edit_metadata_method');
if ($methodEl->length > 0) {
$methodEl = $methodEl->item(0);
@ -1248,7 +1251,7 @@ class ContentModel extends XMLDatastream {
*/
public function execAddDatastreamMethods($dsid, $file) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate() && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && $this->validate() && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$addMethod = $ds->getElementsByTagName('add_datastream_method');
if ($addMethod->length > 0) {
$addMethod = $addMethod->item(0);
@ -1586,7 +1589,7 @@ class ContentModel extends XMLDatastream {
public function addDs($dsid, $display_in_fieldset = FALSE) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) === FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) === FALSE) {
$datastreamsEl = $this->xml->getElementsByTagName('datastreams');
if ($datastreamsEl->length > 0) {
$datastreamsEl = $datastreamsEl->item(0);
@ -1615,7 +1618,7 @@ class ContentModel extends XMLDatastream {
public function removeDs($dsid) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$datastreamsEl = $this->xml->getElementsByTagName('datastreams')->item(0);
$datastreamsEl->removeChild($ds);
$ret = TRUE;
@ -1630,7 +1633,7 @@ class ContentModel extends XMLDatastream {
*/
public function displayInFieldset($dsid) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$ret = strtolower($ds->getAttribute('display_in_fieldset')) == 'true';
}
return $ret;
@ -1644,7 +1647,7 @@ class ContentModel extends XMLDatastream {
*/
public function setDisplayInFieldset($dsid, $value = TRUE) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if ($value == FALSE && $ds->attributes->getNamedItem('display_in_fieldset') !== NULL) {
$ds->removeAttribute('display_in_fieldset');
$ret = TRUE;
@ -1669,7 +1672,7 @@ class ContentModel extends XMLDatastream {
public function setDefaultDispMeth($dsid, $module, $file, $class, $method) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$found = FALSE;
$dispMethods = $ds->getElementsByTagName('display_method');
for ($i = 0; !$found && $i < $dispMethods->length; $i++) {
@ -1707,7 +1710,7 @@ class ContentModel extends XMLDatastream {
*/
public function removeDispMeth($dsid, $module, $file, $class, $method) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$found = FALSE;
$dispMethods = $ds->getElementsByTagName('display_method');
for ($i = 0; !$found && $i < $dispMethods->length; $i++) {
@ -1739,7 +1742,7 @@ class ContentModel extends XMLDatastream {
*/
public function addDispMeth($dsid, $module, $file, $class, $method, $default = FALSE) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$dispMethEl = $this->xml->createElement('display_method');
$dispMethEl->setAttribute('module', $module);
$dispMethEl->setAttribute('file', $file);
@ -1853,7 +1856,7 @@ class ContentModel extends XMLDatastream {
*/
public function addIngestMethod($rule_id, $module, $file, $class, $method, $dsid, $modified_files_ext) {
$ret = FALSE;
if (self::validDsid($dsid) && ($rule = $this->getIngestRule($rule_id)) !== FALSE) {
if (self::valid_dsid($dsid) && ($rule = $this->getIngestRule($rule_id)) !== FALSE) {
$methodsEl = $rule->getElementsByTagName('ingest_methods')->item(0);
$meth = $this->xml->createElement('ingest_method');
$meth->setAttribute('module', $module);
@ -2025,7 +2028,7 @@ class ContentModel extends XMLDatastream {
*/
public function addIngestRule($applies_to, $module, $file, $class, $method, $dsid, $modified_files_ext) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) {
if (self::valid_dsid($dsid) && $this->validate()) {
$ingestRulesEl = $this->xml->getElementsByTagName('ingest_rules')->item(0);
$rule = $this->xml->createElement('rule');
$ingestMethodsEl = $this->xml->createElement('ingest_methods');
@ -2107,7 +2110,7 @@ class ContentModel extends XMLDatastream {
*/
public function editIngestFormAttributes($dsid, $page, $hide_file_chooser = FALSE, $redirect = TRUE) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) {
if (self::valid_dsid($dsid) && $this->validate()) {
$ingest_formEl = $this->xml->getElementsByTagName('ingest_form')->item(0);
$ingest_formEl->setAttribute('dsid', $dsid);
$ingest_formEl->setAttribute('page', $page);

2
MimeClass.inc

@ -3,7 +3,7 @@
// $Id$
/**
*
* @file
* This class inspired by Chris Jean's work, here:
* http://chrisjean.com/2009/02/14/generating-mime-type-in-php-is-not-magic/
*

10
ObjectHelper.inc

@ -60,7 +60,7 @@ class ObjectHelper {
}
$headers = module_invoke_all('file_download', "/fedora/repository/$pid/$dsID");
if (in_array(-1, $headers)) {
drupal_set_message('hello');
drupal_set_message(t('hello'));
drupal_access_denied();
return ' ';
@ -383,7 +383,7 @@ class ObjectHelper {
$input = new DomDocument();
$input->loadXML(trim($xmlstr));
} catch (exception $e) {
watchdog(t("Fedora_Repository"), t("Problem loading XSL file: !e", array('!e' => $e)), NULL, WATCHDOG_ERROR);
watchdog(t("Fedora_Repository"), "Problem loading XSL file: !e", array('!e' => $e), NULL, WATCHDOG_ERROR);
}
$xsl = $proc->importStylesheet($xsl);
$newdom = $proc->transformToDoc($input);
@ -560,7 +560,7 @@ class ObjectHelper {
try {
$sxml = new SimpleXMLElement($content_models);
} catch (exception $e) {
watchdog(t("Fedora_Repository"), t("Could not find a parent object for %s", $pid), NULL, WATCHDOG_ERROR);
watchdog(t("Fedora_Repository"), "Could not find a parent object for %s", $pid, NULL, WATCHDOG_ERROR);
return $pids;
}
@ -972,8 +972,8 @@ class ObjectHelper {
$warnMess = "Creation of one or more datastreams failed.<hr width='40%' align = 'left'/>";
$configMess = "Please ensure that %app is installed and configured for this site. ";
drupal_set_message($warnMess, 'warning', false);
drupal_set_message(t($configMess . "<br />" . $messMap[$app] . "<hr width='40%' align = 'left'/>", array('%app' => $app)), 'warning', false);
drupal_set_message($warnMess, 'warning', FALSE);
drupal_set_message(t($configMess . "<br />" . $messMap[$app] . "<hr width='40%' align = 'left'/>", array('%app' => $app)), 'warning', FALSE);
}
}

6
SearchClass.inc

@ -33,7 +33,7 @@ class SearchClass {
try {
$implementation = new $solrClass();
} catch (Exception $e) {
watchdog(t("Fedora_Repository"), t("Error getting solr search results class: !message", array('!message' => $e->getMessage())), NULL, WATCHDOG_ERROR);
watchdog(t("Fedora_Repository"), "Error getting solr search results class: !message", array('!message' => $e->getMessage()), NULL, WATCHDOG_ERROR);
return 'Error getting solr search results class. Check watchdog for more info.';
}
return $implementation->$solrFunction($query, $startPage, $fq, $dismax);
@ -367,7 +367,7 @@ class SearchClass {
$path = drupal_get_path('module', 'Fedora_Repository');
$test = $xslt_file;
$isRestricted = variable_get('fedora_namespace_restriction_enforced', TRUE);
if (!isRestricted && $xslt_file == null) {
if (!isRestricted && $xslt_file == NULL) {
$xslt_file = '/xsl/unfilteredresults.xsl';
}
$proc = NULL;
@ -431,7 +431,7 @@ class SearchClass {
try {
$proc = new XsltProcessor();
} catch (Exception $e) {
drupal_set_message(t('Error loading results xslt! ') . $e->getMessage());
drupal_set_message(t('Error loading results xslt!') . " " . $e->getMessage());
return ' ';
}

13
XMLDatastream.inc

@ -1,6 +1,9 @@
<?php
// $Id$
/**
* @file
*
*/
/**
* @file
@ -31,7 +34,7 @@ abstract class XMLDatastream {
}
/**
* validPid
* valid_pid
* Validates a fedora PID based on the regexp provided in the fedora
* 3.3 documentation.
* http://www.fedora-commons.org/confluence/display/FCR30/Fedora+Identifiers
@ -39,7 +42,7 @@ abstract class XMLDatastream {
* @param String $pid
* @return boolean $valid
*/
public static function validPid($pid) {
public static function valid_pid($pid) {
$valid = FALSE;
if (strlen(trim($pid)) <= 64 && preg_match('/^([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|\.|~|_|(%[0-9A-F]{2}))+$/', trim($pid))) {
$valid = TRUE;
@ -49,7 +52,7 @@ abstract class XMLDatastream {
}
/**
* validDsid
* valid_dsid
* Validates a fedora Dsid based on the the allowed XML standard NCName.
* The regexp is a "regular" subset of names allowed, it excludes some extended hex characters that are
* technically permitted.
@ -58,7 +61,7 @@ abstract class XMLDatastream {
* @param String $pid
* @return boolean $valid
*/
public static function validDsid($dsid) {
public static function valid_dsid($dsid) {
$valid = FALSE;
if (strlen(trim($dsid)) <= 64 && preg_match('/^[a-zA-Z0-9\_\-\.]+$/', trim($dsid))) {
$valid = TRUE;

2
api/fedora_collection.inc

@ -56,7 +56,7 @@ function export_collection($collection_pid, $relationship = 'isMemberOfCollectio
}
}
else {
drupal_set_message("Error creating temp directory for batch export.", 'error');
drupal_set_message(t("Error creating temp directory for batch export."), 'error');
return FALSE;
}
return TRUE;

54
api/fedora_export.inc

@ -100,14 +100,14 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
// Remove rdf elements added during ingest (if present)
if ($remove_islandora) {
$xpath->registerNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#');
$descNode = $xpath->query("//rdf:RDF/rdf:Description")->item(0);
$desc_node = $xpath->query("//rdf:RDF/rdf:Description")->item(0);
if ($model = $descNode->getElementsByTagName('hasModel')->item(0)) {
$descNode->removeChild($model);
if ($model = $desc_node->getElementsByTagName('hasModel')->item(0)) {
$desc_node->removeChild($model);
}
if ($member = $descNode->getElementsByTagName('rel:isMemberOfCollection')->item(0)) {
$descNode->removeChild($member);
if ($member = $desc_node->getElementsByTagName('rel:isMemberOfCollection')->item(0)) {
$desc_node->removeChild($member);
}
}
@ -121,24 +121,24 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
// Update datastream uris
$xpath->registerNamespace('foxml', 'info:fedora/fedora-system:def/foxml#');
foreach ($xpath->query("//foxml:datastream[@ID]") as $dsNode) {
foreach ($xpath->query("//foxml:datastream[@ID]") as $ds_node) {
// Don't update datastreams having external uris
if (in_array($dsNode->getAttribute('CONTROL_GROUP'), $disallowed_groups)) {
if (in_array($ds_node->getAttribute('CONTROL_GROUP'), $disallowed_groups)) {
continue;
}
$dsId = $dsNode->getAttribute('ID');
$ds_id = $ds_node->getAttribute('ID');
// Remove QUERY datastream
if ($dsId == "QUERY") {
$parentNode = $xpath->query('/foxml:digitalObject')->item(0);
$parentNode->removeChild($dsNode);
if ($ds_id == "QUERY") {
$parent_node = $xpath->query('/foxml:digitalObject')->item(0);
$parent_node->removeChild($ds_node);
}
foreach ($dsNode->getElementsByTagName('*') as $contentNode) {
if ($str = $contentNode->getAttribute('REF')) {
$contentNode->setAttribute('REF', url($paths[$dsId], array('absolute' => TRUE)));
foreach ($ds_node->getElementsByTagName('*') as $content_node) {
if ($str = $content_node->getAttribute('REF')) {
$content_node->setAttribute('REF', url($paths[$ds_id], array('absolute' => TRUE)));
}
}
}
@ -148,29 +148,29 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
case METS_11:
// Update datastream uris
$xpath->registerNamespace('METS', 'http://www.loc.gov/METS/');
foreach ($xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]/METS:fileGrp') as $dsNode) {
foreach ($xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]/METS:fileGrp') as $ds_node) {
$dsId = $dsNode->getAttribute('ID');
$ds_id = $ds_node->getAttribute('ID');
// Remove QUERY datastream
if ($dsId == "QUERY") {
$parentNode = $xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]')->item(0);
$parentNode->removeChild($dsNode);
if ($ds_id == "QUERY") {
$parent_node = $xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]')->item(0);
$parent_node->removeChild($ds_node);
}
$xpath->registerNamespace('xlink', 'http://www.loc.gov/METS/');
foreach ($xpath->query('METS:file[@OWNERID!="E"][@OWNERID!="R"]/METS:FLocat[@xlink:href]', $dsNode) as $Floc) {
$Floc->setAttribute('xlink:href', url($paths[$dsId], array('absolute' => TRUE)));
foreach ($xpath->query('METS:file[@OWNERID!="E"][@OWNERID!="R"]/METS:FLocat[@xlink:href]', $ds_node) as $floc) {
$floc->setAttribute('xlink:href', url($paths[$ds_id], array('absolute' => TRUE)));
}
/*
foreach ($dsNode->getElementsByTagName('METS:file') as $contentNode) {
foreach ($ds_node->getElementsByTagName('METS:file') as $content_node) {
// Don't update datastreams having external uris
if (in_array($dsNode->getAttribute('OWNERID'), $disallowed_groups)) {
if (in_array($ds_node->getAttribute('OWNERID'), $disallowed_groups)) {
continue;
}
foreach ($xpath->('METS:FLocat[@xlink:href]', $contentNode) as $Floc) {
$Floc->setAttribute('xlink:href', url($paths[$dsId], array('absolute' => true)));
foreach ($xpath->('METS:FLocat[@xlink:href]', $content_node) as $floc) {
$floc->setAttribute('xlink:href', url($paths[$ds_id], array('absolute' => true)));
}
`}
*/
@ -201,8 +201,8 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
* @param type $mimeType
* @return type
*/
function get_file_extension($mimeType) {
return substr(strstr($mimeType, '/'), 1);
function get_file_extension($mime_type) {
return substr(strstr($mime_type, '/'), 1);
}
/**

30
api/fedora_item.inc

@ -1,6 +1,10 @@
<?php
// $Id$
/**
* @file
*
*/
/**
* @file
@ -76,7 +80,7 @@ class Fedora_Item {
* @param type $logMessage
* @return type
*/
function add_datastream_from_file($datastream_file, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = null) {
function add_datastream_from_file($datastream_file, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = NULL) {
module_load_include('inc', 'fedora_repository', 'MimeClass');
if (empty($datastream_mimetype)) {
// Get mime type from the file extension.
@ -107,7 +111,7 @@ class Fedora_Item {
* @param type $logMessage
* @return type
*/
function add_datastream_from_url($datastream_url, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = null) {
function add_datastream_from_url($datastream_url, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = NULL) {
if (empty($datastream_label)) {
$datastream_label = $datastream_id;
}
@ -125,7 +129,7 @@ class Fedora_Item {
'dsState' => 'A',
'checksumType' => 'DISABLED',
'checksum' => 'none',
'logMessage' => ($logMessage != null) ? $logMessage : 'Ingested object ' . $datastream_id
'logMessage' => ($logMessage != NULL) ? $logMessage : 'Ingested object ' . $datastream_id
);
@ -142,7 +146,7 @@ class Fedora_Item {
* @param type $logMessage
* @return type
*/
function add_datastream_from_string($str, $datastream_id, $datastream_label = NULL, $datastream_mimetype = 'text/xml', $controlGroup = 'M', $logMessage = null) {
function add_datastream_from_string($str, $datastream_id, $datastream_label = NULL, $datastream_mimetype = 'text/xml', $controlGroup = 'M', $logMessage = NULL) {
$dir = sys_get_temp_dir();
$tmpfilename = tempnam($dir, 'fedoratmp');
$tmpfile = fopen($tmpfilename, 'w');
@ -402,7 +406,7 @@ class Fedora_Item {
* @param type $as_of_date_time
* @return string
*/
function get_dissemination($service_definition_pid, $method_name, $parameters = array(), $as_of_date_time = null) {
function get_dissemination($service_definition_pid, $method_name, $parameters = array(), $as_of_date_time = NULL) {
$params = array(
'pid' => $this->pid,
'serviceDefinitionPid' => $service_definition_pid,
@ -546,7 +550,7 @@ class Fedora_Item {
try {
$relsext = $this->get_datastream_dissemination('RELS-EXT');
} catch (exception $e) {
drupal_set_message("Error retrieving RELS-EXT of object $pid", 'error');
drupal_set_message(t("Error retrieving RELS-EXT of object $pid"), 'error');
return $relationships;
}
@ -587,7 +591,7 @@ class Fedora_Item {
foreach ($relationships as $rel) {
if (empty($rel['subject']) || empty($rel['predicate']) || empty($rel['object']) || $rel['subject'] != 'info:fedora/' . $this->pid) {
// drupal_set_message should use parameterized variables, not interpolated.
drupal_set_message("Error with relationship format: " . $rel['subject'] . " - " . $rel['predicate'] . ' - ' . $rel['object'], "error");
drupal_set_message(t("Error with relationship format: " . $rel['subject'] . " - " . $rel['predicate'] . ' - ' . $rel['object']), "error");
return FALSE;
}
}
@ -727,7 +731,7 @@ class Fedora_Item {
* @param type $quiet
* @return type
*/
function modify_object($label = '', $state = null, $ownerId = null, $logMessage = 'Modified by Islandora API', $quiet=TRUE) {
function modify_object($label = '', $state = NULL, $ownerId = NULL, $logMessage = 'Modified by Islandora API', $quiet=TRUE) {
$params = array(
'pid' => $this->pid,
@ -828,7 +832,7 @@ class Fedora_Item {
$result = $soap_client->__soapCall($function_name, array('parameters' => $params_array));
}
else {
watchdog(t("FEDORA_REPOSITORY"), t("Error trying to get SOAP client connection."));
watchdog(t("FEDORA_REPOSITORY"), "Error trying to get SOAP client connection.");
return NULL;
}
} catch (exception $e) {
@ -841,7 +845,7 @@ class Fedora_Item {
drupal_set_message(t("Error trying to call SOAP function $function_name. Check watchdog logs for more information."), 'error');
}
watchdog(t("FEDORA_REPOSITORY"), t("Error Trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e)), NULL, WATCHDOG_ERROR);
watchdog(t("FEDORA_REPOSITORY"), "Error Trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e), NULL, WATCHDOG_ERROR);
}
return NULL;
}
@ -854,13 +858,13 @@ class Fedora_Item {
$result = $soap_client->__soapCall($function_name, array('parameters' => $params_array));
}
else {
watchdog(t("FEDORA_REPOSITORY"), t("Error trying to get SOAP client connection."));
watchdog(t("FEDORA_REPOSITORY"), "Error trying to get SOAP client connection.");
return NULL;
}
} catch (exception $e) {
if (!$quiet) {
watchdog(t("FEDORA_REPOSITORY"), t("Error trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e)), NULL, WATCHDOG_ERROR);
watchdog(t("FEDORA_REPOSITORY"), "Error trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e), NULL, WATCHDOG_ERROR);
}
return NULL;
}

8
api/fedora_utils.inc

@ -12,7 +12,7 @@
*/
if (!function_exists('str_getcsv')) {
function str_getcsv($input, $delimiter=',', $enclosure='"', $escape=null, $eol=null) {
function str_getcsv($input, $delimiter=',', $enclosure='"', $escape=NULL, $eol=NULL) {
$temp = fopen("php://memory", "rw");
fwrite($temp, $input);
fseek($temp, 0);
@ -109,7 +109,7 @@ function fix_encoding($in_str) {
* @param type $pid
* @return boolean
*/
function validPid($pid) {
function valid_pid($pid) {
$valid = FALSE;
if (strlen(trim($pid)) <= 64 && preg_match('/^([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|\.|~|_|(%[0-9A-F]{2}))+$/', trim($pid))) {
$valid = TRUE;
@ -123,7 +123,7 @@ function validPid($pid) {
* @param type $dsid
* @return boolean
*/
function validDsid($dsid) {
function valid_dsid($dsid) {
$valid = FALSE;
if (strlen(trim($dsid)) <= 64 && preg_match('/^[a-zA-Z0-9\_\-\.]+$/', trim($dsid))) {
$valid = TRUE;
@ -137,7 +137,7 @@ function validDsid($dsid) {
* @param type $dsid
* @return string
*/
function fixDsid($dsid) {
function fix_dsid($dsid) {
$new_dsid = trim($dsid);
$find = '/[^a-zA-Z0-9\.\_\-]/';

1
api/rels-ext.inc

@ -21,7 +21,6 @@ class RelsExt {
* the repository for the given Fedora_Item.
* @param Fedora_Item $item
*/
function RelsExt($item) {
$relsextxml = $item->get_datastream_dissemination('RELS-EXT');
}

2
api/tagging.inc

@ -69,7 +69,7 @@ class TagSet {
$this->item->modify_datastream_by_value($tagdoc->saveXML(), $this->tagsDSID, 'Tags', 'text/xml', 'X');
}
} catch (exception $e) {
drupal_set_message('There was an error saving the tags datastream: !e', array('!e' => $e), 'error');
drupal_set_message(t('There was an error saving the tags datastream: !e'), array('!e' => $e), 'error');
return FALSE;
}
return TRUE;

1
collection_policies/COLLECTION-COLLECTION POLICY.xml

@ -1,3 +1,4 @@
<collection_policy name="" xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model dsid="ISLANDORACM" name="Collection" namespace="islandora:collection" pid="islandora:collectionCModel"/>

25
collection_policies/PDF-COLLECTION POLICY.xml

@ -1 +1,24 @@
<?xml version="1.0" encoding="utf-8"?> <collection_policy xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd"> <content_models> <content_model name="STANDARD_PDF" dsid="ISLANDORACM" namespace="islandora:spdf" pid="islandora:standard_pdf"/> <content_model name="STRICT_PDF" dsid="ISLANDORACM" namespace="islandora:strictpdf" pid="islandora:strict_pdf"/> <content_model name="REFWORKS_BATCH" dsid="ISLANDORACM" namespace="islandora:ref" pid="islandora:refworks_cm"/> </content_models> <search_terms> <term field="dc.title">dc.title</term> <term field="dc.creator">dc.creator</term> <term field="dc.description" default="true">dc.description</term> <term field="dc.date">dc.date</term> <term field="dc.identifier">dc.identifier</term> <term field="dc.language">dc.language</term> <term field="dc.publisher">dc.publisher</term> <term field="dc.rights">dc.rights</term> <term field="dc.subject">dc.subject</term> <term field="dc.relation">dc.relation</term> <term field="dcterms.temporal">dcterms.temporal</term> <term field="dcterms.spatial">dcterms.spatial</term> <term field="fgs.DS.first.text">Full Text</term> </search_terms> <relationship>isMemberOfCollection</relationship> </collection_policy>
<?xml version="1.0" encoding="utf-8"?>
<collection_policy xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model name="STANDARD_PDF" dsid="ISLANDORACM" namespace="islandora:spdf" pid="islandora:standard_pdf"/>
<content_model name="STRICT_PDF" dsid="ISLANDORACM" namespace="islandora:strictpdf" pid="islandora:strict_pdf"/>
<content_model name="REFWORKS_BATCH" dsid="ISLANDORACM" namespace="islandora:ref" pid="islandora:refworks_cm"/>
</content_models>
<search_terms>
<term field="dc.title">dc.title</term>
<term field="dc.creator">dc.creator</term>
<term field="dc.description" default="true">dc.description</term>
<term field="dc.date">dc.date</term>
<term field="dc.identifier">dc.identifier</term>
<term field="dc.language">dc.language</term>
<term field="dc.publisher">dc.publisher</term>
<term field="dc.rights">dc.rights</term>
<term field="dc.subject">dc.subject</term>
<term field="dc.relation">dc.relation</term>
<term field="dcterms.temporal">dcterms.temporal</term>
<term field="dcterms.spatial">dcterms.spatial</term>
<term field="fgs.DS.first.text">Full Text</term>
</search_terms>
<relationship>isMemberOfCollection</relationship>
</collection_policy>

1
collection_policies/PERSONAL-COLLECTION-POLICY.xml

@ -1,3 +1,4 @@
<collection_policy>
<!---we will define allowed mimetypes and what to do with various types as part of the content model-->
<contentmodels>

1
collection_policies/book_collection_policy.xml

@ -1,3 +1,4 @@
<collection_policy>
<!---we will define allowed mimetypes and what to do with various types as part of the content model-->
<contentmodels>

39
collection_policies/qt_collection_policy.xml

@ -5,31 +5,44 @@
</content_models>
<search_terms>
<term field="dc.title">
dc.title</term>
dc.title
</term>
<term field="dc.creator">
dc.creator</term>
dc.creator
</term>
<term field="dc.description" default="true">
dc.description</term>
dc.description
</term>
<term field="dc.date">
dc.date</term>
dc.date
</term>
<term field="dc.identifier">
dc.identifier</term>
dc.identifier
</term>
<term field="dc.language">
dc.language</term>
dc.language
</term>
<term field="dc.publisher">
dc.publisher</term>
dc.publisher
</term>
<term field="dc.rights">
dc.rights</term>
dc.rights
</term>
<term field="dc.subject">
dc.subject</term>
dc.subject
</term>
<term field="dc.relation">
dc.relation</term>
dc.relation
</term>
<term field="dcterms.temporal">
dcterms.temporal</term>
dcterms.temporal
</term>
<term field="dcterms.spatial">
dcterms.spatial</term>
dcterms.spatial
</term>
</search_terms>
<relationship>
isMemberOfCollection</relationship>
isMemberOfCollection
</relationship>
</collection_policy>

1
collection_policy.xsd

@ -1,3 +1,4 @@
<xsd:schema xmlns="http://www.islandora.ca" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.islandora.ca" elementFormDefault="qualified" >
<xsd:annotation>
<xsd:documentation xml:lang="en">

7
collection_views/Coverflow_Collection_View.xsl

@ -1,3 +1,4 @@
<xsl:stylesheet exclude-result-prefixes="php" version="1.0" xmlns:php="http://php.net/xsl"
xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
@ -40,7 +41,8 @@
// YAHOO.util.Event.onDOMReady(function(){
//$(document).ready(function(){
window.onload = function(){
var images = [</xsl:text>
var images = [
</xsl:text>
<xsl:for-each select="/s:sparql/s:results/s:result">
<xsl:variable name="OBJECTURI" select="s:object/@uri"/>
<xsl:variable name="pid" select="substring-after($OBJECTURI,'/')"/>
@ -67,7 +69,8 @@
var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {onclick: {fn: moveLeft, obj: myCoverFlow}});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}});
};</xsl:text>
};
</xsl:text>
</script>
<div class="title">Testing YUI's CoverFlow version 0.1 (beta)</div>
<div id="coverFlowTest"/>

7
collection_views/Coverflow_PRE_Collection_View.xsl

@ -1,3 +1,4 @@
<xsl:stylesheet exclude-result-prefixes="php" version="1.0" xmlns:php="http://php.net/xsl"
xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
@ -40,7 +41,8 @@
// YAHOO.util.Event.onDOMReady(function(){
//$(document).ready(function(){
window.onload = function(){
var images = [</xsl:text>
var images = [
</xsl:text>
<xsl:for-each select="/s:sparql/s:results/s:result">
<xsl:variable name="OBJECTURI" select="s:object/@uri"/>
<xsl:variable name="pid" select="substring-after($OBJECTURI,'/')"/>
@ -71,7 +73,8 @@
var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {onclick: {fn: moveLeft, obj: myCoverFlow}});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}});
};</xsl:text>
};
</xsl:text>
</script>
<div class="title">Testing YUI's CoverFlow version 0.1 (beta)</div>
<div id="coverFlowTest"/>

143
collection_views/FLV-COLLECTION VIEW(2).xml

@ -18,48 +18,79 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -143,27 +203,40 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/>
<xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>

131
collection_views/REFWORKS-COLLECTION_VIEW.xml

@ -18,48 +18,79 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="s:sparql/s:results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -145,10 +205,14 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="($CONTENTMODEL='islandora:collectionCModel')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="s:title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="s:title"/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="s:content"/>
@ -164,9 +228,12 @@
</xsl:attribute>
</img> </a> <br clear="all" />-->
<br /><a>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="s:title"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>

145
collection_views/SIMPLE-COLLECTION_VIEW.xml

@ -18,48 +18,79 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="s:sparql/s:results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -145,28 +205,41 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="($CONTENTMODEL='islandora:collectionCModel')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="s:title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="s:title"/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="s:content"/>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/>
<xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<br /><a>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="s:title"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>

4
collection_views/SmileyStuff-COLLECTION_VIEW.xml

@ -1,3 +1,4 @@
<xsl:stylesheet version="1.0" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="BASEURL">
@ -51,7 +52,8 @@
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text>
<xsl:value-of select="$pid"/>/-/<xsl:value-of select="s:memberTitle"/>
<xsl:value-of select="$pid"/>/-/
<xsl:value-of select="s:memberTitle"/>
</xsl:attribute>
<xsl:value-of select="s:memberTitle"/>
</a>

4
collection_views/Video-COLLECTION_VIEW.xml

@ -1,3 +1,4 @@
<xsl:stylesheet version="1.0" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="BASEURL">
@ -48,7 +49,8 @@
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text>
<xsl:value-of select="$pid"/>/-/<xsl:value-of select="s:memberTitle"/>
<xsl:value-of select="$pid"/>/-/
<xsl:value-of select="s:memberTitle"/>
</xsl:attribute>
<xsl:value-of select="s:memberTitle"/>
</a>

125
collection_views/default-sparqltoHtml.xsl

@ -19,100 +19,165 @@
<xsl:if test="$count>0">
<table>
<tr><td colspan="2">
<tr>
<td colspan="2">
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div>
</td></tr>
</td>
</tr>
<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
<xsl:variable name='PID' select="substring-after($OBJECTURI,'/')"/>
<tr>
<td>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
</img>
</td><td>
</td>
<td>
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
</td></tr>
</td>
</tr>
</xsl:for-each>
</table>
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>

4
collection_views/simple_list_view.xml

@ -1,3 +1,4 @@
<xsl:stylesheet version="1.0" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- simple list view for a itql query that looks queries for $object and $title only -->
<xsl:template match="/">
@ -14,7 +15,8 @@
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text>
<xsl:value-of select="$pid"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$pid"/>/-/
<xsl:value-of select="s:title"/>
</xsl:attribute>
<xsl:value-of select="s:title"/>
</a>

4
collection_views/standard_jpeg_collection_view.xml

@ -1,3 +1,4 @@
<xsl:stylesheet version="1.0" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="BASEURL">
@ -50,7 +51,8 @@
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text>
<xsl:value-of select="$pid"/>/-/<xsl:value-of select="s:memberTitle"/>
<xsl:value-of select="$pid"/>/-/
<xsl:value-of select="s:memberTitle"/>
</xsl:attribute>
<xsl:value-of select="s:memberTitle"/>
</a>

88
collection_views/yui_coverflow/js/CoverFlow.js vendored

@ -203,15 +203,23 @@ YAHOO.namespace("ext");
},
attachEventListeners: function(){
new YAHOO.util.KeyListener(this.element, { keys:39 },
{ fn:this.selectNext,
new YAHOO.util.KeyListener(this.element, {
keys:39
},
{
fn:this.selectNext,
scope:this,
correctScope:true } ).enable();
correctScope:true
} ).enable();
new YAHOO.util.KeyListener(this.element, { keys:37 },
{ fn:this.selectPrevious,
new YAHOO.util.KeyListener(this.element, {
keys:37
},
{
fn:this.selectPrevious,
scope:this,
correctScope:true } ).enable();
correctScope:true
} ).enable();
},
@ -245,15 +253,39 @@ YAHOO.namespace("ext");
if(distance == 0){// selected
coverFlowItem.setZIndex(this.imageZIndex);
coverFlowItem.isSelected(false);
animateItems.push({item: coverFlowItem, attribute:{angle: {start: 0, end: this.perspectiveAngle} } });
animateItems.push({
item: coverFlowItem,
attribute:{
angle: {
start: 0,
end: this.perspectiveAngle
}
}
});
coverFlowItem = this.coverFlowItems[++i];
coverFlowItem.isSelected(true);
this.showLabel(coverFlowItem.getLabel());
animateItems.push({item: coverFlowItem, attribute:{angle: {start: this.perspectiveAngle, end: 0} } });
animateItems.push({
item: coverFlowItem,
attribute:{
angle: {
start: this.perspectiveAngle,
end: 0
}
}
});
}else{
animateItems.push({item: coverFlowItem, attribute: {left: {start:coverFlowItem.getLeft(), end: coverFlowItem.getLeft() - CoverFlow.IMAGE_SEPARATION} }});
animateItems.push({
item: coverFlowItem,
attribute: {
left: {
start:coverFlowItem.getLeft(),
end: coverFlowItem.getLeft() - CoverFlow.IMAGE_SEPARATION
}
}
});
}
}
}
@ -292,15 +324,39 @@ YAHOO.namespace("ext");
coverFlowItem.setZIndex(this.selectedImageZIndex);
coverFlowItem.isSelected(true);
this.showLabel(coverFlowItem.getLabel());
animateItems.push({item: coverFlowItem, attribute: {angle: {start: this.perspectiveAngle, end: 0}}});
animateItems.push({
item: coverFlowItem,
attribute: {
angle: {
start: this.perspectiveAngle,
end: 0
}
}
});
coverFlowItem = this.coverFlowItems[++i];
coverFlowItem.isSelected(false);
coverFlowItem.setZIndex(this.imageZIndex);
animateItems.push({item: coverFlowItem, attribute: {angle: {start: 0, end: this.perspectiveAngle}}});
animateItems.push({
item: coverFlowItem,
attribute: {
angle: {
start: 0,
end: this.perspectiveAngle
}
}
});
}else{
coverFlowItem.setZIndex(coverFlowItem.getZIndex() - 1);
animateItems.push({item: coverFlowItem, attribute: {left: {start:coverFlowItem.getLeft(), end: coverFlowItem.getLeft() + CoverFlow.IMAGE_SEPARATION} }});
animateItems.push({
item: coverFlowItem,
attribute: {
left: {
start:coverFlowItem.getLeft(),
end: coverFlowItem.getLeft() + CoverFlow.IMAGE_SEPARATION
}
}
});
}
}
}
@ -364,7 +420,10 @@ YAHOO.namespace("ext");
scaledHeight: this.scaleHeight(image),
reflectionRatio: this.reflectionRatio,
bgColor: this.backgroundColor,
onclick: {fn: this.select, scope: this}
onclick: {
fn: this.select,
scope: this
}
});
this.alignCenterHeight(coverFlowItem);
this.coverFlowItems.push(coverFlowItem);
@ -573,7 +632,8 @@ YAHOO.namespace("ext");
ctx.fillRect(0, 0, scaledWidth, scaledHeight);
//apply the background color to the gradient
ctx.globalCompositeOperation = 'destination-over';
ctx.fillStyle = bgColor; '#000';
ctx.fillStyle = bgColor;
'#000';
ctx.globalAlpha = 0.8;
ctx.fillRect(0, 0 , scaledWidth, scaledHeight);
ctx.restore();

75
collection_views/yui_coverflow/js/test.js vendored

@ -4,15 +4,37 @@
YAHOO.util.Event.onDOMReady(function(){
var images = [
{src: 'images/ardillitaMac.jpg', label: 'Ardileta!', onclick: function(){alert('image1');}},
{src: 'http://farm2.static.flickr.com/1380/1426855399_b4b8eccbdb.jpg?v=0'},
{src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'},
{src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'},
{src: 'images/msn2.jpg', label: 'My Mac'},
{src: 'images/msn2.jpg', label: 'My Mac again...'}
{
src: 'images/ardillitaMac.jpg',
label: 'Ardileta!',
onclick: function(){
alert('image1');
}
},
{
src: 'http://farm2.static.flickr.com/1380/1426855399_b4b8eccbdb.jpg?v=0'
},
{
src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'
},
{
src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'
},
{
src: 'images/msn2.jpg',
label: 'My Mac'
},
{
src: 'images/msn2.jpg',
label: 'My Mac again...'
}
];
var myCoverFlow = new YAHOO.ext.CoverFlow('coverFlowTest', {height: 200, width: 600, images: images});
var myCoverFlow = new YAHOO.ext.CoverFlow('coverFlowTest', {
height: 200,
width: 600,
images: images
});
function moveLeft(e, coverFlow){
coverFlow.selectNext();
@ -20,17 +42,44 @@ YAHOO.util.Event.onDOMReady(function(){
function moveRight(e, coverFlow){
coverFlow.selectPrevious();
}
var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {onclick: {fn: moveLeft, obj: myCoverFlow}});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}});
var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {
onclick: {
fn: moveLeft,
obj: myCoverFlow
}
});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {
onclick: {
fn: moveRight,
obj: myCoverFlow
}
});
var otherImages = [
{src: 'images/ardillitaMac.jpg', label: 'Ardileta!', onclick: function(){alert('image1');}},
{src: 'images/msn2.jpg', label: 'My Mac'},
{src: 'images/msn2.jpg', label: 'My Mac again...'}
{
src: 'images/ardillitaMac.jpg',
label: 'Ardileta!',
onclick: function(){
alert('image1');
}
},
{
src: 'images/msn2.jpg',
label: 'My Mac'
},
{
src: 'images/msn2.jpg',
label: 'My Mac again...'
}
];
var anotherCoverFlow = new YAHOO.ext.CoverFlow('anotherCoverFlowTest', {height: 150, width: 500, images: otherImages, bgColor: '#C0C0C0'});
var anotherCoverFlow = new YAHOO.ext.CoverFlow('anotherCoverFlowTest', {
height: 150,
width: 500,
images: otherImages,
bgColor: '#C0C0C0'
});

1
content_models/COLLECTIONCM.xml

@ -1,3 +1,4 @@
<content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Collection" version="2" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>text/xml</type>

1
content_models/FAS_slideCModel.xml

@ -1,3 +1,4 @@
<content_model name="standard_slide">
<mimetypes>
<type>image/tiff</type>

33
content_models/STANDARD_QT.xml

@ -53,12 +53,14 @@
<element label="Creator/" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
service.
</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
service.
</description>
<authoritative_list>
<item>home recording</item>
<item>meeting</item>
@ -69,27 +71,32 @@
<element label="Description of Media" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of
contents, or free-text account of the content of the
resource.</description>
resource.
</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations,
or services), responsible for making the resource
available.</description>
available.
</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the
content of the resource such as a person, organization or
service.</description>
service.
</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date
format is YYYY-MM-DD (e.g. 1890,1910-10,or
2007-10-23)</description>
2007-10-23)
</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples
include: home page, novel, poem, working paper, technical
report, essay, dictionary.</description>
report, essay, dictionary.
</description>
<authoritative_list>
<item>none</item>
<item>video</item>
@ -108,16 +115,19 @@
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the
present resource is derived.</description>
present resource is derived.
</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this
instance, the accession number or collection
number.</description>
number.
</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of
the resource.</description>
the resource.
</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
@ -129,7 +139,8 @@
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property
rights, copyright, and various property
rights.</description>
rights.
</description>
</element>
</form_elements>
</ingest_form>

1
content_models/STRICT_PDFCM.xml

@ -1,3 +1,4 @@
<content_model name="strict_pdf" xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>application/pdf</type>

15
content_models/ilives_tei2htmlSdep-pageCModel.xml

@ -197,8 +197,11 @@
<xsl:attribute name="class">search persName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22<xsl:value-of
select=".//tei:surname"/>+<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22
<xsl:value-of
select=".//tei:surname"/>+
<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:apply-templates select="*|node()"/>
</a>
</span>
@ -213,7 +216,9 @@
<xsl:attribute name="class">search placeName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22
<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>
@ -222,7 +227,9 @@
<xsl:attribute name="class">search orgName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22
<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>

20
content_models/islandora_mods2htmlSdep.xml

@ -435,27 +435,35 @@
</xsl:choose>
</xsl:template>
<xsl:template name="attr">
<xsl:for-each select="@type|@point">:<xsl:call-template name="longName">
<xsl:for-each select="@type|@point">:
<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="@authority or @edition">
<xsl:for-each select="@authority">(<xsl:call-template name="longName">
<xsl:for-each select="@authority">(
<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="@edition">Edition <xsl:value-of select="@edition"/>
</xsl:if>)</xsl:if>
<xsl:if test="@edition">Edition
<xsl:value-of select="@edition"/>
</xsl:if>)
</xsl:if>
<xsl:variable name="attrStr">
<xsl:for-each select="@*[local-name()!='edition' and local-name()!='type' and local-name()!='authority' and local-name()!='point']">
<xsl:value-of select="local-name()"/>="<xsl:value-of select="."/>",</xsl:for-each>
<xsl:value-of select="local-name()"/>="
<xsl:value-of select="."/>",
</xsl:for-each>
</xsl:variable>
<xsl:variable name="nattrStr" select="normalize-space($attrStr)"/>
<xsl:if test="string-length($nattrStr)">(<xsl:value-of select="substring($nattrStr,1,string-length($nattrStr)-1)"/>)</xsl:if>
<xsl:if test="string-length($nattrStr)">(
<xsl:value-of select="substring($nattrStr,1,string-length($nattrStr)-1)"/>)
</xsl:if>
</xsl:template>
</xsl:stylesheet>
</foxml:xmlContent>

33
content_models/islandora_qtCModel.xml

@ -76,12 +76,14 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<element label="Creator/" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
service.
</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
service.
</description>
<authoritative_list>
<item>home recording</item>
<item>meeting</item>
@ -92,27 +94,32 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<element label="Description of Media" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of
contents, or free-text account of the content of the
resource.</description>
resource.
</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations,
or services), responsible for making the resource
available.</description>
available.
</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the
content of the resource such as a person, organization or
service.</description>
service.
</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date
format is YYYY-MM-DD (e.g. 1890,1910-10,or
2007-10-23)</description>
2007-10-23)
</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples
include: home page, novel, poem, working paper, technical
report, essay, dictionary.</description>
report, essay, dictionary.
</description>
<authoritative_list>
<item>none</item>
<item>video</item>
@ -131,16 +138,19 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the
present resource is derived.</description>
present resource is derived.
</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this
instance, the accession number or collection
number.</description>
number.
</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of
the resource.</description>
the resource.
</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
@ -152,7 +162,8 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property
rights, copyright, and various property
rights.</description>
rights.
</description>
</element>
</form_elements>
</ingest_form>

146
example_collection_views/MHL-sparqltoHtml.xsl

@ -18,84 +18,144 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -124,30 +184,44 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/<xsl:value-of select="title"/>/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/
<xsl:value-of select="title"/>/
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>
<xsl:if test="(content!='Collection' and content!='Community')">
<br />--<a>
<br />--
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
DETAILS
</a>--

95
example_collection_views/critter.xsl

@ -5,29 +5,92 @@
<xsl:template match="/">
<ul>
<li><b>Date Collected:</b><xsl:text> </xsl:text> <xsl:value-of select="/critters:sample/critters:date_collected"/></li>
<li><b>Type:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:type"/></li>
<li><b>Phylum:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:phylum"/></li>
<li><b>SubPhylum:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:SubPhylum"/></li>
<li><b>Class:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:class"/></li>
<li><b>Order:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:order"/></li>
<li><b>Family:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:family"/></li>
<li><b>Genus:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:genus"/></li>
<li><b>Species:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:species"/></li>
<li>
<b>Date Collected:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:date_collected"/>
</li>
<li>
<b>Type:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:type"/>
</li>
<li>
<b>Phylum:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:phylum"/>
</li>
<li>
<b>SubPhylum:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:SubPhylum"/>
</li>
<li>
<b>Class:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:class"/>
</li>
<li>
<b>Order:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:order"/>
</li>
<li>
<b>Family:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:family"/>
</li>
<li>
<b>Genus:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:genus"/>
</li>
<li>
<b>Species:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:species"/>
</li>
</ul>
<h4>Collection Location</h4>
<ul>
<li><b>Site Name:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:sitename"/></li>
<li><b>Country:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:country"/></li>
<li><b>Region:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:region"/></li>
<li><b>Latitude:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:latitude"/></li>
<li><b>Longitude:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:longitude"/></li>
<li><b>Depth:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:depth"/><xsl:text> </xsl:text>Feet</li>
<li>
<b>Site Name:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:sitename"/>
</li>
<li>
<b>Country:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:country"/>
</li>
<li>
<b>Region:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:region"/>
</li>
<li>
<b>Latitude:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:latitude"/>
</li>
<li>
<b>Longitude:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:longitude"/>
</li>
<li>
<b>Depth:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:depth"/>
<xsl:text> </xsl:text>Feet
</li>
</ul>
<h4>Description</h4>
<div><xsl:value-of select="/critters:sample/critters:description"/></div>
<div>
<xsl:value-of select="/critters:sample/critters:description"/>
</div>
</xsl:template>
</xsl:stylesheet>

143
example_collection_views/flv-sparqltoHtml.xsl

@ -18,48 +18,79 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -143,27 +203,40 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/>
<xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>

139
example_collection_views/mlp-sparqltoHtml.xsl

@ -18,84 +18,144 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -124,27 +184,38 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/<xsl:value-of select="title"/>/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/
<xsl:value-of select="title"/>/
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
</img> <br clear="all" />
</img>
<br clear="all" />
<xsl:value-of select="$newTitle"/>
<xsl:if test="(content!='Collection' and content!='Community')">
<br />--<a>
<br />--
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
DETAILS
</a>--

174
example_collection_views/refworks.xsl

@ -6,27 +6,127 @@
<xsl:if test="/reference/jf">
<h2>General Information</h2>
<table cellpadding="2" cellspacing="2">
<tr><td ><strong>Periodical:</strong></td><td><xsl:value-of select="/reference/jf"/></td></tr>
<tr><td><strong>Abbreviation:</strong></td><td><xsl:value-of select="/reference/jo"/></td></tr>
<tr><td><strong>Volume:</strong></td><td><xsl:value-of select="/reference/vo"/></td></tr>
<tr><td><strong>Issue:</strong></td><td><xsl:value-of select="/reference/is"/></td></tr>
<tr><td><strong>Publisher:</strong></td><td><xsl:value-of select="/reference/pb"/></td></tr>
<tr><td><strong>Place of Publication:</strong></td><td><xsl:value-of select="/reference/pp"/></td></tr>
<tr><td><strong>Edition:</strong></td><td><xsl:value-of select="/reference/ed"/></td></tr>
<tr><td><strong>Year:</strong></td><td><xsl:value-of select="/reference/yr"/></td></tr>
<tr><td><strong>Date:</strong></td><td><xsl:value-of select="/reference/fd"/></td></tr>
<tr><td><strong>Start Page:</strong></td><td><xsl:value-of select="/reference/sp"/></td></tr>
<tr><td><strong>Other Pages:</strong></td><td><xsl:value-of select="/reference/op"/></td></tr>
<tr><td><strong>ISSN/ISBN:</strong></td><td><xsl:value-of select="/reference/sn"/></td></tr>
<tr><td><strong>Language:</strong></td><td><xsl:value-of select="/reference/la"/></td></tr>
<tr><td><strong>UL:</strong></td><td><xsl:value-of select="/reference/ul"/></td></tr>
<tr>
<td >
<strong>Periodical:</strong>
</td>
<td>
<xsl:value-of select="/reference/jf"/>
</td>
</tr>
<tr>
<td>
<strong>Abbreviation:</strong>
</td>
<td>
<xsl:value-of select="/reference/jo"/>
</td>
</tr>
<tr>
<td>
<strong>Volume:</strong>
</td>
<td>
<xsl:value-of select="/reference/vo"/>
</td>
</tr>
<tr>
<td>
<strong>Issue:</strong>
</td>
<td>
<xsl:value-of select="/reference/is"/>
</td>
</tr>
<tr>
<td>
<strong>Publisher:</strong>
</td>
<td>
<xsl:value-of select="/reference/pb"/>
</td>
</tr>
<tr>
<td>
<strong>Place of Publication:</strong>
</td>
<td>
<xsl:value-of select="/reference/pp"/>
</td>
</tr>
<tr>
<td>
<strong>Edition:</strong>
</td>
<td>
<xsl:value-of select="/reference/ed"/>
</td>
</tr>
<tr>
<td>
<strong>Year:</strong>
</td>
<td>
<xsl:value-of select="/reference/yr"/>
</td>
</tr>
<tr>
<td>
<strong>Date:</strong>
</td>
<td>
<xsl:value-of select="/reference/fd"/>
</td>
</tr>
<tr>
<td>
<strong>Start Page:</strong>
</td>
<td>
<xsl:value-of select="/reference/sp"/>
</td>
</tr>
<tr>
<td>
<strong>Other Pages:</strong>
</td>
<td>
<xsl:value-of select="/reference/op"/>
</td>
</tr>
<tr>
<td>
<strong>ISSN/ISBN:</strong>
</td>
<td>
<xsl:value-of select="/reference/sn"/>
</td>
</tr>
<tr>
<td>
<strong>Language:</strong>
</td>
<td>
<xsl:value-of select="/reference/la"/>
</td>
</tr>
<tr>
<td>
<strong>UL:</strong>
</td>
<td>
<xsl:value-of select="/reference/ul"/>
</td>
</tr>
</table>
</xsl:if>
<xsl:if test="/reference/t1">
<h2>Titles</h2>
<ul>
<xsl:for-each select="/reference/t1">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -34,7 +134,9 @@
<ul>
<h3>Secondary Titles</h3>
<xsl:for-each select="/reference/t2">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -42,7 +144,9 @@
<h2>Authors</h2>
<ul>
<xsl:for-each select="/reference/a1">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -51,7 +155,9 @@
<ul>
<h3>Secondary Authors</h3>
<xsl:for-each select="/reference/a2">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -59,34 +165,52 @@
<h2>Keywords</h2>
<ul>
<xsl:for-each select="/reference/k1">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="/reference/ab">
<h2>Abstract</h2>
<xsl:for-each select="/reference/ab">
<div><xsl:value-of select="."/> </div>
<div>
<xsl:value-of select="."/>
</div>
</xsl:for-each>
</xsl:if>
<xsl:if test="/reference/no">
<h2>Notes</h2>
<xsl:for-each select="/reference/no">
<div><xsl:value-of select="."/> </div>
<div>
<xsl:value-of select="."/>
</div>
</xsl:for-each>
</xsl:if>
<xsl:variable name="ISSN">
<xsl:value-of select="/reference/sn"/>
</xsl:variable>
<xsl:variable name="BASEURL">
http://articles.library.upei.ca:7888/godot/hold_tab.cgi?hold_tab_branch=PCU&amp;issn=<xsl:value-of select="/reference/sn/text()"/>&amp;date=<xsl:value-of select="/reference/yr/text()"/>&amp;volume=<xsl:value-of select="/reference/vo/text()"/>&amp;issue=<xsl:value-of select="/reference/is/text()"/>&amp;spage=<xsl:value-of select="/reference/sp/text()"/>&amp;atitle=<xsl:value-of select="/reference/t1"/>&amp;stitle=<xsl:value-of select="/reference/jf"/>
http://articles.library.upei.ca:7888/godot/hold_tab.cgi?hold_tab_branch=PCU&amp;issn=
<xsl:value-of select="/reference/sn/text()"/>&amp;date=
<xsl:value-of select="/reference/yr/text()"/>&amp;volume=
<xsl:value-of select="/reference/vo/text()"/>&amp;issue=
<xsl:value-of select="/reference/is/text()"/>&amp;spage=
<xsl:value-of select="/reference/sp/text()"/>&amp;atitle=
<xsl:value-of select="/reference/t1"/>&amp;stitle=
<xsl:value-of select="/reference/jf"/>
</xsl:variable>
<br />
<xsl:if test="/reference/sn">
<div><a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/></xsl:attribute>
<div>
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<img src="http://asin1.its.unb.ca:8000/muse/images/getit4.gif"/> </a></div>
<img src="http://asin1.its.unb.ca:8000/muse/images/getit4.gif"/>
</a>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

148
example_collection_views/riri-sparqltoHtml.xsl

@ -18,48 +18,79 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -143,32 +203,46 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="title"/>.pdf <!-- we know in riri that all OBJ streams are pdf so we can add the extension to tell browsers what it is-->
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="title"/>.pdf <!-- we know in riri that all OBJ streams are pdf so we can add the extension to tell browsers what it is-->
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/>
<xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>
<xsl:if test="(content!='Collection' and content!='Community')">
<br />--<a>
<br />--
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
DETAILS
</a>--

125
example_collection_views/sparqltoHtml.xsl

@ -19,48 +19,78 @@
<xsl:if test="$count>0">
<table width='100%'>
<tr><td colspan="2">
<tr>
<td colspan="2">
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div>
</td></tr>
</td>
</tr>
<!--select="//guestbook/entry[position()>=$start and $end>=position()]">-->
<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -68,52 +98,87 @@
<tr>
<td>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
</img>
</td><td>
</td>
<td>
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
</td></tr>
</td>
</tr>
</xsl:for-each>
</table>
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>

3
fedora_repository.install

@ -1,5 +1,6 @@
<?php
// $Id$
/**
* @file fedora_repository.install

69
fedora_repository.module

@ -53,7 +53,8 @@ function fedora_repository_purge_object($pid = NULL, $name = NULL) {
drupal_set_message(t('You must specify an object pid to purge an object.'), 'error');
return '';
}
$output = t('Are you sure you wish to purge object %name %pid!<br /><b>This cannot be undone</b><br />', array(
$output = t('Are you sure you wish to purge object %name %pid!<br /><b>This cannot be undone</b><br />',
array(
'%name' => $name,
'%pid' => $pid)
);
@ -93,8 +94,8 @@ function fedora_repository_ingest_object($collection_pid=NULL, $collection_label
return '';
}
if (!validPid($collection_pid)) {
if (validPid(urldecode($collection_pid))) {
if (!valid_pid($collection_pid)) {
if (valid_pid(urldecode($collection_pid))) {
$collection_pid = urldecode($collection_pid);
}
else {
@ -286,7 +287,7 @@ function fedora_repository_purge_object_form(&$form_state, $pid, $referrer = NUL
function add_stream($collection_pid=NULL, $collectionName=NULL) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
if (!validPid($collection_pid)) {
if (!valid_pid($collection_pid)) {
drupal_set_message(t("This PID is not valid!"), 'error');
return ' ';
}
@ -403,7 +404,8 @@ function fedora_repository_purge_stream($pid = NULL, $dsId = NULL, $name = NULL)
return ' ';
}
$output = t('Are you sure you wish to purge this datastream %name<br />', array(
$output = t('Are you sure you wish to purge this datastream %name<br />',
array(
'%name' => $name)
);
$output .= drupal_get_form('fedora_repository_purge_stream_form', $pid, $dsId);
@ -706,12 +708,12 @@ function fedora_repository_access($op, $node, $account) {
*/
function makeObject($pid, $dsID) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
if (!validPid($pid)) {
if (!valid_pid($pid)) {
drupal_set_message(t("Invalid PID!"), 'error');
return ' ';
}
if (!validDsid($dsID)) {
if (!valid_dsid($dsID)) {
drupal_set_message(t("Invalid dsID!"), 'error');
return ' ';
}
@ -742,27 +744,29 @@ function makeObject($pid, $dsID) {
function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NULL, $page_number = NULL, $limit = NULL) {
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
global $user;
if (!fedora_available()) {
drupal_set_message('The Fedora repository server is currently unavailable. Please contact the site administrator.', 'warning', FALSE);
drupal_set_message(t('The Fedora repository server is currently unavailable. Please contact the site administrator.'), 'warning', FALSE);
return '';
}
if ($pid & !validPid($pid)) {
$item = new fedora_item($pid);
if (!$item->exists()) {
drupal_not_found();
}
if ($pid & !validPid($pid)) {
drupal_set_message(t("Invalid PID!"), 'error');
return ' ';
}
if ($dsId & !validDsid($dsId)) {
if ($dsId & !valid_dsid($dsId)) {
drupal_set_message(t("Invalid dsID!"), 'error');
return ' ';
}
if (!fedora_repository_access(OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) {
//drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied"), 'error');
if (user_access('access administration pages')) {
drupal_set_message(t("PIDs may be added to allowed namespaces, or all namespace restrictions removed !here", array('!here' => l('here', 'admin/settings/fedora_repository'))), 'warning');
}
@ -790,13 +794,6 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
module_load_include('inc', 'fedora_repository', 'CollectionClass');
$collectionClass = new CollectionClass();
//if(!isset($pageNumber)){
// $pageNumber=0;
//}
//if(!isset($limit)){
// $limit=20;
//}
module_load_include('inc', 'fedora_repository', 'ContentModel');
module_load_include('inc', 'fedora_repository', 'plugins/fedoraObject');
$breadcrumbs = array();
@ -804,15 +801,12 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
drupal_set_breadcrumb(array_reverse($breadcrumbs));
$offset = $limit * $page_number;
//$results = $collectionClass->getRelatedObjects($pid, $limit, $offset, NULL); //updated so we can do paging in query not in xslt
//$results = $collectionClass->getRelatedItems($pid, NULL);
$content_models = $objectHelper->get_content_models_list($pid);
// Each content model may return either a tabset array or plain HTML. If it's HTML, stick it in a tab.
$cmodels_tabs = array(
'#type' => 'tabset',
);
foreach ($content_models as $content_model) {
//$content_model_fieldsets = $objectHelper->createExtraFieldsets($pid, $content_model, $pageNumber);
$content_model_fieldset = $content_model->displayExtraFieldset($pid, $page_number);
if (is_array($content_model_fieldset)) {
$cmodels_tabs = array_merge($cmodels_tabs, $content_model_fieldset);
@ -829,13 +823,6 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
$obj = new FedoraObject($pid);
$object_details = $obj->showFieldSets();
$cmodels_tabs = array_merge($cmodels_tabs, $object_details);
//$content .= $objectHelper
//$content .= $objectHelper->parseContent($results, $pid, $dsId, $collection, $pageNumber);
//the below is for islandlives we should be able to do this in the xslt though
//$css=$path.'/stylesheets/container-large.css';
//drupal_add_css($css);
return tabs_render($cmodels_tabs);
}
@ -892,7 +879,7 @@ function repository_service($pid = NULL, $servicePid = NULL, $serviceMethod = NU
$item = new Fedora_Item($pid);
if ($item !== false) {
if ($item !== FALSE) {
echo $item->get_dissemination($servicePid, $serviceMethod);
}
@ -1391,7 +1378,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$cmodel_collection->add_relationship('hasModel', 'islandora:collectionCModel', FEDORA_MODEL_URI);
$cmodel_collection->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_views/simple_list_view.xml', 'COLLECTION_VIEW', 'Collection View', 'text/xml', 'X');
$cmodel_collection->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/contentModel.jpg', 'TN', 'Thumbnail', 'image/jpg', 'M');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:ContentModelCollection\">islandora:ContentModelCollection</a>.", 'message');
drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:ContentModelCollection\">islandora:ContentModelCollection</a>."), 'message');
} catch (exception $e) {
}
@ -1403,7 +1390,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$cp = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_policies/COLLECTION-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy', 'text/xml', 'X');
try {
$tn = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Gnome-emblem-photos.png', 'TN', 'Thumbnail.png', 'image/png', 'M');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:top\">islandora:top</a>.", 'message');
drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:top\">islandora:top</a>."), 'message');
} catch (exception $e) {
}
@ -1423,7 +1410,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$new_item->add_relationship('hasModel', 'islandora:collectionCModel', FEDORA_MODEL_URI);
$cp = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_policies/PDF-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy', 'text/xml', 'X');
$tn = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Crystal_Clear_mimetype_pdf.png', 'TN', 'Thumbnail.png', 'image/png', 'M');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:demos\">islandora:demos</a>.", 'message');
drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:demos\">islandora:demos</a>."), 'message');
} catch (exception $e) {
}
@ -1445,7 +1432,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$dual_res_image_collection_cmodel = new Fedora_Item('demo:DualResImageCollection');
try {
$cmstream = $dual_res_image_collection_cmodel->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/content_models/COLLECTIONCM.xml', 'ISLANDORACM', 'Islandora Content Model.xml', 'application/xml', 'X');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/demo:SmileyStuff\">demo:SmileyStuff</a> collection view.", 'message');
drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/demo:SmileyStuff\">demo:SmileyStuff</a> collection view."), 'message');
} catch (exception $e) {
}
@ -1464,14 +1451,14 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
try {
$item = Fedora_Item::ingest_from_FOXML_file(drupal_get_path('module', 'fedora_repository') . '/content_models/islandora_largeimages.xml');
$tn = $item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Gnome-emblem-photos.png', 'TN', 'Thumbnail.png', 'image/png', 'M');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:largeimages\">islandora:largeimages</a>.", 'message');
drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:largeimages\">islandora:largeimages</a>."), 'message');
} catch (exception $e) {
$error .= " - Problem ingesting islandora:largeimages collection";
}
}
if (!empty($error)) {
drupal_set_message('Some problems occurred: ' . $error);
drupal_set_message(t('Some problems occurred: ' . $error));
}
}
}
@ -1919,7 +1906,7 @@ function _fedora_repository_empty_basket() {
function fedora_repository_add_to_basket($pid, $warn = TRUE, $searchResultsFlag = FALSE) {
if ($warn && _is_added_to_basket($pid)) {
drupal_set_message("Object already in basket");
drupal_set_message(t("Object already in basket"));
}
if (!isset($_SESSION['basket'])) {
@ -1960,7 +1947,9 @@ function theme_add_to_basket_link($pid, $type = 'object') {
*/
if (!_is_added_to_basket($pid)) {
return l(
theme('image', drupal_get_path('module', 'Fedora_Repository') . '/images/' . $save, t("Add to basket"), t("Add this @object to my basket", array('@object' => $object))), "fedora/repository/addToBasket/" . $path, array('html' => TRUE)
theme('image', drupal_get_path('module', 'Fedora_Repository') . '/images/' . $save, t("Add to basket"), t("Add this @object to my basket", array('@object' => $object))),
"fedora/repository/addToBasket/" . $path,
array('html' => TRUE)
);
}
@ -1988,7 +1977,7 @@ function fedora_repository_batch_reingest_object($object, &$context) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
if (!empty($object) && is_array($object)) {
$pid = $object['pid'];
if (!validPid($pid)) {
if (!valid_pid($pid)) {
return NULL;
}
// Does the object exist? If so, purge it.

11
fedora_repository.solutionpacks.inc

@ -1,7 +1,7 @@
<?php
/**
* @file
* Invokes a hook to any dependent modules asking them if their installations require
* any fedora objects to be present. Modules implementing this hook should return an array
* of arrays of the form:
@ -87,7 +87,8 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
if (!$item->exists()) {
$object_status = 'Missing';
$needs_install = TRUE;
} else {
}
else {
if (isset($object['dsid']) && isset($object['datastream_file']) && isset($object['dsversion'])) {
$datastreams = array(
array(
@ -96,7 +97,8 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
'dsversion' => $object['dsversion'],
),
);
} elseif (!empty($object['datastreams'])) {
}
elseif (!empty($object['datastreams'])) {
$datastreams = $object['datastreams'];
}
if (!empty($datastreams) && is_array($datastreams)) {
@ -137,7 +139,8 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
);
if (!$needs_install && !$needs_update) {
$form['install_status']['#value'] = theme_image('misc/watchdog-ok.png') . t('All required objects are installed and up-to-date.');
} else {
}
else {
$form['install_status']['#value'] = theme_image('misc/watchdog-warning.png') . t('Some objects must be re-ingested. See Objects list for details.');
}
$form['submit'] = array(

17
formClass.inc

@ -2,6 +2,14 @@
// $Id$
/**
* @file
* formClass class
*/
/**
* form Class
*/
class formClass {
function formClass() {
@ -237,7 +245,8 @@ class formClass {
$form['fedora_repository_url'] = array(
'#type' => 'textfield',
'#title' => t('Fedora RISearch URL'),
'#default_value' => variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'),
'#default_value' => variable_get('fedora_repository_url',
'http://localhost:8080/fedora/risearch'),
'#description' => t('The url of the Fedora server'), '#required' => TRUE,
'#weight' => 0
);
@ -437,10 +446,14 @@ class formClass {
try {
$object = $client->__soapCall('ModifyDatastreamByValue', array($params));
} catch (exception $e) {
drupal_set_message(t("Error updating metadata ") . $e->getMessage(), 'error');
drupal_set_message(t("Error updating metadata") . " " . $e->getMessage(), 'error');
}
}
/**
* queries the collection object for a childsecurity datastream and if found parses it
* to determine if this user is allowed to ingest in this collection
*/ we assume if they are able to modify objects in the collection they can ingest as well.
function can_ingest_here($collection_pid) {
module_load_include('inc', 'fedora_repository', 'SecurityClass');
$securityClass = new SecurityClass();

5
ilives/book.inc

@ -1,6 +1,9 @@
<?php
// $Id$
/**
* @file
*
*/
class IslandoraBook {

3
ilives/fedora_ilives.install

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* @file fedora_ilives.install

2
ilives/fedora_ilives.module

@ -1,6 +1,6 @@
<?php
// $Id$
/*
* To change this template, choose Tools | Templates

13
ilives/image_rotator_tagger_block.inc

@ -1,7 +1,8 @@
<?php
// $Id$
/*
/**
* @file image_rotator_tagger_block.inc
*/
@ -42,10 +43,8 @@ and $object <dc:title> $title';
return array('pid' => $pid,
//'title' => $randresult->textContent);
'title' => $title->nodeValue);
}
function _fedora_image_rotator_tagger_block_content() {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'plugins/tagging_form');
@ -68,8 +67,12 @@ function _fedora_image_rotator_tagger_block_content() {
$image_item = new Fedora_Item($result['pid']);
}
if (!empty($result)) {
$image = theme_image( . $base_url . '/fedora/imageapi/' . $result['pid'] . '/JPG?op=scale&height=500&width=300');
return '<p>'
. l('<img src="' . $base_url . '/fedora/imageapi/' . $result['pid'] . '/JPG?op=scale&height=500&width=300" />', 'fedora/repository/' . $result['pid'], array('html' => TRUE, 'alias' => TRUE))
//. l(t("!image", array(image => $image))
. '<p>This image is from ' . l($result['title'], 'fedora/ilives_book_viewer/' . substr($image_item->pid, 0, strrpos($image_item->pid, '-')), array('html' => TRUE, 'alias' => TRUE)) . '.'
. drupal_get_form('fedora_repository_image_tagging_form', $result['pid']) . '</p>';
}
@ -78,7 +81,6 @@ function _fedora_image_rotator_tagger_block_content() {
}
}
/*
function fedora_ilives_preprocess_page(&$variables) {
drupal_add_js(drupal_get_path('module', 'fedora_ilives').'/fedora_ilives_ajax.js', 'theme');
@ -104,4 +106,5 @@ class ShowILivesStreamsInFieldSets {
return theme('fieldset', $collection_fieldset)
. drupal_get_form('fedora_repository_image_tagging_form', $this->pid);
}
}

11
ilives/tests/fedora_ilives.test

@ -1,7 +1,9 @@
<?php
// $Id$
/*
/**
* @file
* Tests the functions of the Fedora Repository module.
*/
@ -31,7 +33,6 @@ class FedoraBookTestCase extends DrupalWebTestCase {
$this->drupalLogin($repository_user);
}
public function testBookCModel() {
@ -73,7 +74,6 @@ class FedoraBookTestCase extends DrupalWebTestCase {
$this->pass("Successfully ingested book object $book_pid.");
}
$this->cleanUpRepository($pid_list);
}
private function cleanUpRepository($pid_list = array()) {
@ -100,7 +100,7 @@ class FedoraBookTestCase extends DrupalWebTestCase {
}
$output_path = "$file_dir/$basename." . $this->randomName(10) . '.html';
$rv = file_put_contents($output_path, $this->drupalGetContent());
$this->pass("$description: Contents of result page are ". l('here', $output_path));
$this->pass("$description: Contents of result page are " . l(t('here'), $output_path));
}
protected function drupalCreateFedoraUser($permissions = array('access comments', 'access content', 'post comments', 'post comments without approval')) {
@ -130,3 +130,4 @@ class FedoraBookTestCase extends DrupalWebTestCase {
}
}

3
ilives/xml/ilives_CollectionModel.xml

@ -128,7 +128,8 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<dc:description>Made possible through a generous private donation, the IslandLives project builds on the Robertson Library’s mission to preserve and share unique material relating to Prince Edward Island and demonstrates UPEI&apos;s ongoing commitment to making PEI&apos;s cultural and published heritage available to all.
Utilizing the library’s “Prince Edward Island Collection” and the latest in digitization technology, IslandLives will start by digitizing 300 or so published community histories dating from the mid-1800’s to the present day. These transformed community histories will form the basis of a rich online repository.
IslandLives will provide a variety of search interfaces that will allow users to browse and search the content by name, community, time period, and keyword. The Island community will have a whole new way to rediscover, search and share their stories.
This project will engage and build community – recruiting interested individuals from the cultural heritage community and everyday Islanders. Project staff will travel to communities and host ‘digitization days’, introducing community members to the project and its goals, providing them with an opportunity to digitize their own content, and to contribute their content to the IslandLives collection.</dc:description>
This project will engage and build community – recruiting interested individuals from the cultural heritage community and everyday Islanders. Project staff will travel to communities and host ‘digitization days’, introducing community members to the project and its goals, providing them with an opportunity to digitize their own content, and to contribute their content to the IslandLives collection.
</dc:description>
<dc:contributor>Robertson Library, University of Prince Edward Island</dc:contributor>
<dc:identifier>ilives:CollectionModel</dc:identifier>
</oai_dc:dc>

15
ilives/xml/ilives_tei2htmlSdep-pageCModel.xml

@ -189,8 +189,11 @@
<xsl:attribute name="class">search persName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22<xsl:value-of
select=".//tei:surname"/>+<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22
<xsl:value-of
select=".//tei:surname"/>+
<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:apply-templates select="*|node()"/>
</a>
</span>
@ -205,7 +208,9 @@
<xsl:attribute name="class">search placeName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22
<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>
@ -214,7 +219,9 @@
<xsl:attribute name="class">search orgName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22
<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>

9
ilives/xsl/MODS3-22simpleDC.xsl

@ -297,7 +297,8 @@ Version 1.0 2007-05-04 Tracy Meehleib <tmee@loc.gov>
<xsl:choose>
<xsl:when test="contains ('isbn issn uri doi lccn uri', $type)">
<dc:identifier>
<xsl:value-of select="$type"/>: <xsl:value-of select="."/>
<xsl:value-of select="$type"/>: 
<xsl:value-of select="."/>
</dc:identifier>
</xsl:when>
<xsl:otherwise>
@ -389,12 +390,14 @@ Version 1.0 2007-05-04 Tracy Meehleib <tmee@loc.gov>
<xsl:template match="mods:dateIssued[@point='start'] | mods:dateCreated[@point='start'] | mods:dateCaptured[@point='start'] | mods:dateOther[@point='start'] ">
<xsl:variable name="dateName" select="local-name()"/>
<dc:date>
<xsl:value-of select="."/>-<xsl:value-of select="../*[local-name()=$dateName][@point='end']"/>
<xsl:value-of select="."/>-
<xsl:value-of select="../*[local-name()=$dateName][@point='end']"/>
</dc:date>
</xsl:template>
<xsl:template match="mods:temporal[@point='start'] ">
<xsl:value-of select="."/>-<xsl:value-of select="../mods:temporal[@point='end']"/>
<xsl:value-of select="."/>-
<xsl:value-of select="../mods:temporal[@point='end']"/>
</xsl:template>
<xsl:template match="mods:temporal[@point!='start' and @point!='end'] ">

163
ilives/xsl/book_view.xsl

@ -14,52 +14,161 @@
<xsl:template match="/">
<h1 ><xsl:value-of select="//mods:titleInfo/mods:nonSort"/><xsl:text> </xsl:text><xsl:value-of select="//mods:titleInfo/mods:title"/> <xsl:for-each select="//mods:titleInfo/mods:subTitle">
: <xsl:value-of select="."/></xsl:for-each></h1>
<xsl:for-each select="//mods:titleInfo[@type='alternative']/mods.title"><h3>
<h1 >
<xsl:value-of select="//mods:titleInfo/mods:nonSort"/>
<xsl:text> </xsl:text>
<xsl:value-of select="//mods:titleInfo/mods:title"/>
<xsl:for-each select="//mods:titleInfo/mods:subTitle">
:
<xsl:value-of select="."/>
</xsl:for-each>
</h1>
<xsl:for-each select="//mods:titleInfo[@type='alternative']/mods.title">
<h3>
<!-- <xsl:value-of select="substring-before(text(),'/')"/>-->
<xsl:value-of select="."/><xsl:text> </xsl:text> </h3>
<xsl:value-of select="."/>
<xsl:text> </xsl:text>
</h3>
</xsl:for-each>
<table cellpadding="3" cellspacing="2" valign="top" ><tr><td valign="top">
<table cellpadding="3" cellspacing="2" valign="top" >
<tr>
<td valign="top">
<img>
<xsl:attribute name="src"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:copy-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PID"/>/TN
</xsl:attribute>
</img>
</td><td ><div style="align:left"><table cellpadding="3" cellspacing="2" width="90%" >
<tr><td align="right" valign="top"><b>By Statement: </b></td><td valign="top"><xsl:value-of select="//mods:note[@type='statement of responsibility']"/></td></tr>
<tr><td align="right" valign="top"><b>Place of Publication: </b></td ><td valign="top"><xsl:value-of select="//mods:placeTerm[@type='text']"/></td></tr>
<tr><td align="right" valign="top"><b>Publisher: </b></td><td valign="top"><xsl:value-of select="//mods:publisher"/></td></tr>
<tr><td align="right" valign="top"><b>Date: </b></td><td valign="top"><xsl:value-of select="//mods:dateIssued"/></td></tr>
<tr><td align="right" valign="top"><b>Language: </b></td><td valign="top"><xsl:value-of select="//mods:languageTerm"/></td></tr>
<tr><td align="right" valign="top"><b>Pagination: </b></td><td valign="top"><xsl:value-of select="//mods:extent"/></td></tr>
<tr><td align="right" valign="top"><b>ISBN 10: </b></td><td valign="top"><xsl:value-of select="//mods:identifier[@type='isbn']"/></td></tr>
<tr><td align="right" valign="top"><b>Subjects: </b></td><td valign="top"><xsl:for-each select="//mods:subject">
</td>
<td >
<div style="align:left">
<table cellpadding="3" cellspacing="2" width="90%" >
<tr>
<td align="right" valign="top">
<b>By Statement: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:note[@type='statement of responsibility']"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Place of Publication: </b>
</td >
<td valign="top">
<xsl:value-of select="//mods:placeTerm[@type='text']"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Publisher: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:publisher"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Date: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:dateIssued"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Language: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:languageTerm"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Pagination: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:extent"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>ISBN 10: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:identifier[@type='isbn']"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Subjects: </b>
</td>
<td valign="top">
<xsl:for-each select="//mods:subject">
<xsl:for-each select="*">
<a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/mods.subject:"<xsl:value-of select="normalize-space(.)"/>"%20AND%20dc.type:collection%20AND%20dc.type:ingested
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/mods.subject:"
<xsl:value-of select="normalize-space(.)"/>"%20AND%20dc.type:collection%20AND%20dc.type:ingested
</xsl:attribute>
<xsl:value-of select="."/></a><xsl:text> </xsl:text></xsl:for-each><br /></xsl:for-each>
</td></tr>
</table></div></td><td valign="top">
<xsl:value-of select="."/>
</a>
<xsl:text> </xsl:text>
</xsl:for-each>
<br />
</xsl:for-each>
</td>
</tr>
</table>
</div>
</td>
<td valign="top">
<xsl:if test="$INGESTED = 'true'">
<div><a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/<xsl:value-of select="$PID"/></xsl:attribute>Read</a>
</div></xsl:if>
<div>
<a><xsl:attribute name="href">http://islandpines.roblib.upei.ca/opac/en-CA/skin/roblib/xml/rdetail.xml?r=<xsl:value-of select="$RECORDID"/></xsl:attribute>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/
<xsl:value-of select="$PID"/>
</xsl:attribute>Read
</a>
</div>
</xsl:if>
<div>
<a>
<xsl:attribute name="href">http://islandpines.roblib.upei.ca/opac/en-CA/skin/roblib/xml/rdetail.xml?r=
<xsl:value-of select="$RECORDID"/>
</xsl:attribute>
Checkout
</a>
</div> <xsl:if test="$INGESTED = 'true'"><div>
<a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:value-of select="$PID"/>/PDF/<xsl:value-of select="$PID"/>.pdf</xsl:attribute>Download</a>
</div></xsl:if>
</div>
<xsl:if test="$INGESTED = 'true'">
<div>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:value-of select="$PID"/>/PDF/
<xsl:value-of select="$PID"/>.pdf
</xsl:attribute>Download
</a>
</div>
</xsl:if>
<xsl:if test="($USER > 0) and ($INGESTED = 'true')">
<div>
<a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>teieditor/<xsl:value-of select="$PID"/></xsl:attribute>Edit</a>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>teieditor/
<xsl:value-of select="$PID"/>
</xsl:attribute>Edit
</a>
</div>
</xsl:if>
</td></tr></table>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>

13
ilives/xsl/pageResults.xsl

@ -118,21 +118,26 @@
<td valign="top" width="16%">
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/<xsl:copy-of select="$PIDVALUE"/>
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/
<xsl:copy-of select="$PIDVALUE"/>
</xsl:attribute>
<img>
<xsl:attribute name="alt">Thumbnail <xsl:copy-of select="$PIDVALUE"/></xsl:attribute>
<xsl:attribute name="alt">Thumbnail
<xsl:copy-of select="$PIDVALUE"/>
</xsl:attribute>
<xsl:attribute name="src">
<!--http://islandlives.ca:8080/adore-djatoka/resolver?url_ver=Z39.88-2004&amp;rft_id=http://islandlives.ca/fedora/repository/<xsl:copy-of select="$PIDVALUE"/>/JP2/jp2.jp2&amp;svc_id=info:lanl-repo/svc/getRegion&amp;svc_val_fmt=info:ofi/fmt:kev:mtx:jpeg2000&amp;svc.format=image/jpeg&amp;svc.level=0&amp;svc.rotate=0&amp;svc.region=0,0,100,100</xsl:attribute>
-->
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:copy-of select="$PIDVALUE"/>/TN
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PIDVALUE"/>/TN
</xsl:attribute>
</img>
</a>
<br />
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/<xsl:value-of select="$PIDVALUE"/>
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/
<xsl:value-of select="$PIDVALUE"/>
</xsl:attribute>
<xsl:value-of select="substring-before($DCTITLE, '-')"/>
<br />

105
ilives/xsl/results.xsl

@ -41,8 +41,12 @@
<xsl:choose>
<xsl:when test="$HITTOTAL > 0">
Total Hits = <strong><xsl:value-of select="$HITTOTAL"/>,</strong>
Number of Hits/page = <xsl:value-of select="$HITPAGESIZE"/>
Total Hits =
<strong>
<xsl:value-of select="$HITTOTAL"/>,
</strong>
Number of Hits/page =
<xsl:value-of select="$HITPAGESIZE"/>
<!-- <br />You may not have sufficient privileges to view any or all of the items found. The objects you have rights to view will be shown below.-->
<!--Current page = <xsl:value-of select="@hitPageStart"/>-->
<br/>
@ -54,15 +58,24 @@
<xsl:if test="$HITPAGENO > 1">
<li class="pager-previous">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/<xsl:value-of select="$FULLQUERY"/>/<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/
<xsl:value-of select="$FULLQUERY"/>/
<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/>
</xsl:attribute>
&lt; Previous
</a>
</li>
</xsl:if><xsl:text> </xsl:text>
</xsl:if>
<xsl:text> </xsl:text>
<xsl:if test="$HITPAGENO &lt; $HITPAGENOLAST">
<li class="pager-next">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/<xsl:value-of select="$FULLQUERY"/>/<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/
<xsl:value-of select="$FULLQUERY"/>/
<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/>
</xsl:attribute>
Next >
</a>
</li>
@ -89,15 +102,24 @@
<xsl:if test="$HITPAGENO > 1">
<li class="pager-previous">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/<xsl:value-of select="$FULLQUERY"/>/<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/
<xsl:value-of select="$FULLQUERY"/>/
<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/>
</xsl:attribute>
&lt; Previous
</a>
</li>
</xsl:if><xsl:text> </xsl:text>
</xsl:if>
<xsl:text> </xsl:text>
<xsl:if test="$HITPAGENO &lt; $HITPAGENOLAST">
<li class="pager-next">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/<xsl:value-of select="$FULLQUERY"/>/<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/
<xsl:value-of select="$FULLQUERY"/>/
<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/>
</xsl:attribute>
Next >
</a>
</li>
@ -111,12 +133,21 @@
<h2>Your search yielded no results</h2>
<div class="content"><ul>
<div class="content">
<ul>
<li>Check if your spelling is correct.</li>
<li>Remove quotes around phrases to match each word individually: <em>"blue smurf"</em> will match less than <em>blue smurf</em>.</li>
<li>Consider loosening your query with <em>OR</em>: <em>blue smurf</em> will match less than <em>blue OR smurf</em>.</li>
</ul></div>
<li>Remove quotes around phrases to match each word individually:
<em>"blue smurf"</em> will match less than
<em>blue smurf</em>.
</li>
<li>Consider loosening your query with
<em>OR</em>:
<em>blue smurf</em> will match less than
<em>blue OR smurf</em>.
</li>
</ul>
</div>
</div>
@ -126,12 +157,15 @@
<xsl:template match="objects">
<table cellpadding="3" cellspacing="3" width="100%"><div class="search-results">
<tr><td colspan="2">
<table cellpadding="3" cellspacing="3" width="100%">
<div class="search-results">
<tr>
<td colspan="2">
</td></tr>
</td>
</tr>
<xsl:for-each select="object">
<xsl:variable name="PIDVALUE">
<xsl:choose>
@ -156,7 +190,8 @@
</xsl:for-each>
</div></table>
</div>
</table>
</xsl:template>
<xsl:template name="splitBySpace">
@ -209,15 +244,21 @@
<xsl:variable name="CLEANTITLE">
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $DCTITLE)"/>
</xsl:variable>
<tr><td valign="top">
<tr>
<td valign="top">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives/<xsl:copy-of select="$PIDVALUE"/>/<xsl:value-of select="$FULLQUERY"/>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives/
<xsl:copy-of select="$PIDVALUE"/>/
<xsl:value-of select="$FULLQUERY"/>
</xsl:attribute>
<!--<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/><![CDATA[&pid=]]><xsl:value-of select="$PIDVALUE"/><![CDATA[&collection=object]]>
</xsl:attribute>-->
<img>
<xsl:attribute name="src"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:copy-of select="$PIDVALUE"/>/TN
<xsl:attribute name="src">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PIDVALUE"/>/TN
</xsl:attribute>
<xsl:attribute name="height">100</xsl:attribute>
</img>
@ -234,17 +275,22 @@
<span class="searchtitle">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives/<xsl:value-of select="$PIDVALUE"/>/<xsl:value-of select="$FULLQUERY"/>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives/
<xsl:value-of select="$PIDVALUE"/>/
<xsl:value-of select="$FULLQUERY"/>
</xsl:attribute>
<xsl:for-each select="field[@name='mods.title']">
<!-- <xsl:value-of select="substring-before(text(),'/')"/>-->
<xsl:value-of select="node()"/><xsl:text> </xsl:text>
<xsl:value-of select="node()"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.subTitle']">
<span class="searchsubtitle">
<xsl:text> : </xsl:text><xsl:value-of select="node()"/>
<xsl:text> : </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>
@ -255,35 +301,40 @@
<xsl:for-each select="field[@name='mods.sor']">
<span class="searchcreator">
<xsl:text> / </xsl:text> <xsl:value-of select="node()"/>
<xsl:text> / </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.place_of_publication']">
<span class="searchpop">
<xsl:text> </xsl:text> <xsl:value-of select="node()"/>
<xsl:text> </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.publisher']">
<span class="searchpop">
<xsl:text> : </xsl:text> <xsl:value-of select="node()"/>
<xsl:text> : </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.dateIssued']">
<span class="searchdateIssued">
<xsl:text>, </xsl:text> <xsl:value-of select="node()"/>.
<xsl:text>, </xsl:text>
<xsl:value-of select="node()"/>.
</span>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.edition']">
<span class="searchedition">
<xsl:text> </xsl:text> <xsl:value-of select="node()"/>
<xsl:text> </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>

1
islandoracm.xsd

@ -1,3 +1,4 @@
<xsd:schema xmlns="http://www.islandora.ca" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.islandora.ca" elementFormDefault="qualified">
<xsd:annotation>

4
js/AC_Quicktime.js

@ -64,7 +64,9 @@ var gQTGeneratorVersion = 1.2;
var gQTBehaviorID = "qt_event_source";
var gQTEventsEnabled = false;
function AC_QuickTimeVersion() { return gQTGeneratorVersion; }
function AC_QuickTimeVersion() {
return gQTGeneratorVersion;
}
function _QTComplain(callingFcnName, errMsg)
{

13
js/printer_tool.js

@ -3,12 +3,19 @@
var PrinterTool = {};
PrinterTool.windowSettings = 'toolbar=no,location=no,' + 'status=no,menu=no,scrollbars=yes,width=650,height=400';
/** * Open a printer-friendly page and prompt for printing. * @param tagID * The ID of the tag that contains the material that should * be printed. */
PrinterTool.print = function (tagID) { var target = document.getElementById(tagID); var title = document.title;
if(!target || target.childNodes.length === 0) { alert("Nothing to Print"); return;
PrinterTool.print = function (tagID) {
var target = document.getElementById(tagID);
var title = document.title;
if(!target || target.childNodes.length === 0) {
alert(t("Nothing to Print"));
return;
}
var content = target.innerHTML;
var text = '<html><head><title>' + title +
'</title><body>' + content +'</body></html>';
printerWindow = window.open('', '', PrinterTool.windowSettings); printerWindow.document.open(); printerWindow.document.write(text); printerWindow.document.close();
printerWindow = window.open('', '', PrinterTool.windowSettings);
printerWindow.document.open();
printerWindow.document.write(text);
printerWindow.document.close();
printerWindow.print();
};

51
js/swfobject.js

@ -10,23 +10,37 @@ if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
if (!document.getElementById) { return; }
if (!document.getElementById) {
return;
}
this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params = new Object();
this.variables = new Object();
this.attributes = new Array();
if(swf) { this.setAttribute('swf', swf); }
if(id) { this.setAttribute('id', id); }
if(w) { this.setAttribute('width', w); }
if(h) { this.setAttribute('height', h); }
if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
if(swf) {
this.setAttribute('swf', swf);
}
if(id) {
this.setAttribute('id', id);
}
if(w) {
this.setAttribute('width', w);
}
if(h) {
this.setAttribute('height', h);
}
if(ver) {
this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split(".")));
}
this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
if (!window.opera && document.all && this.installedVer.major > 7) {
// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
deconcept.SWFObject.doPrepUnload = true;
}
if(c) { this.addParam('bgcolor', c); }
if(c) {
this.addParam('bgcolor', c);
}
var q = quality ? quality : 'high';
this.addParam('quality', q);
this.setAttribute('useExpressInstall', false);
@ -34,7 +48,9 @@ deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, re
var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
this.setAttribute('xiRedirectUrl', xir);
this.setAttribute('redirectUrl', '');
if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
if(redirectUrl) {
this.setAttribute('redirectUrl', redirectUrl);
}
}
deconcept.SWFObject.prototype = {
useExpressInstall: function(path) {
@ -81,9 +97,13 @@ deconcept.SWFObject.prototype = {
swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
var params = this.getParams();
for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
for(var key in params){
swfNode += [key] +'="'+ params[key] +'" ';
}
var pairs = this.getVariablePairs().join("&");
if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
if (pairs.length > 0){
swfNode += 'flashvars="'+ pairs +'"';
}
swfNode += '/>';
} else { // PC IE
if (this.getAttribute("doExpressInstall")) {
@ -97,7 +117,9 @@ deconcept.SWFObject.prototype = {
swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
}
var pairs = this.getVariablePairs().join("&");
if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
if(pairs.length > 0) {
swfNode += '<param name="flashvars" value="'+ pairs +'" />';
}
swfNode += "</object>";
}
return swfNode;
@ -209,7 +231,12 @@ if (deconcept.SWFObject.doPrepUnload) {
window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
}
/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}
if (Array.prototype.push == null) {
Array.prototype.push = function(item) {
this[this.length] = item;
return this.length;
}
}
/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;

1
plugins/CollectionFormBuilder.inc

@ -13,6 +13,7 @@ module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
* implements methods from content model ingest form xml
* builds a dc metadata form
*/
class CollectionFormBuilder extends FormBuilder {
/**

6
plugins/DarwinCore.inc

@ -1,6 +1,10 @@
<?php
// $Id$
/* @file
*/
/**
* @file

1
plugins/DemoFormBuilder.inc

@ -12,6 +12,7 @@ module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
* implements methods from content model ingest form xml
* builds a dc metadata form
*/
class DemoFormBuilder extends FormBuilder {
/**

7
plugins/DocumentConverter.inc

@ -1,6 +1,5 @@
<?php
// $Id$
/**
* @file
@ -71,7 +70,7 @@ class DocumentConverter {
$returnValue = file_put_contents($outputFile, $data);
if ($returnValue > 0) {
drupal_set_message("Conversion successful.", 'status');
drupal_set_message(t("Conversion successful."), 'status');
$_SESSION['fedora_ingest_files']["$dsid"] = $outputFile;
return $outputFile;
}
@ -80,7 +79,7 @@ class DocumentConverter {
}
}
else {
drupal_set_message("Conversion Failed. Webservice returned $code.", 'status');
drupal_set_message(t("Conversion Failed. Webservice returned $code."), 'status');
return FALSE;
}
}
@ -91,5 +90,5 @@ class DocumentConverter {
$documentConverter = new DocumentConverter();
$inputFile = "document.docx";
$outputType = "txt";
$documentConverter->convert( null, 'TXT', $inputFile, $outputType);
$documentConverter->convert( NULL, 'TXT', $inputFile, $outputType);
/* */

6
plugins/Ffmpeg.inc

@ -30,7 +30,7 @@ class Ffmpeg {
* @return type
*/
function extract_thumbnail($parameterArray, $dsid, $file, $file_ext) {
$defaults = array('ss' => '00:00:10', 's' => null);
$defaults = array('ss' => '00:00:10', 's' => NULL);
$params = array_merge($defaults, $parameterArray);
$system = getenv('System');
$file_suffix = '_' . $dsid . '.' . $file_ext;
@ -38,13 +38,13 @@ class Ffmpeg {
$output = array();
$size = '';
if ($params['s'] != null) {
if ($params['s'] != NULL) {
$size = ' -s ' . escapeshellarg($params['s']);
}
exec('ffmpeg -i ' . escapeshellarg($file) . ' -r 1 -ss ' . escapeshellarg($params['ss']) . ' ' . $size . ' -t 1 ' . escapeshellarg($file . $file_suffix));
if (!file_exists($file . $file_suffix)) {
return false;
return FALSE;
}
$_SESSION['fedora_ingest_files']["$dsid"] = $file . $file_suffix;

2
plugins/FlvFormBuilder.inc

@ -12,6 +12,7 @@ module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
* implements methods from content model ingest form xml
* builds a dc metadata form
*/
class FlvFormBuilder extends FormBuilder {
/**
@ -29,6 +30,7 @@ class FlvFormBuilder extends FormBuilder {
* @param type $dom
* @param type $rootElement
*/
function createFedoraDataStreams($form_values, &$dom, &$rootElement) {
module_load_include('inc', 'fedora_repository', 'MimeClass');
global $base_url;

6
plugins/FormBuilder.inc

@ -102,14 +102,14 @@ class FormBuilder {
$policyElement = $dom->createDocumentFragment();
if (!$policyElement) {
drupal_set_message(t('Error parsing security policy stream.'));
watchdog(t("Fedora_Repository"), t("Error parsing security policy stream, could not parse policy stream."), NULL, WATCHDOG_NOTICE);
watchdog(t("Fedora_Repository"), "Error parsing security policy stream, could not parse policy stream.", NULL, WATCHDOG_NOTICE);
return FALSE;
}
$dom->importNode($policyElement, TRUE);
$value = $policyElement->appendXML($policyStreamDoc);
if (!$value) {
drupal_set_message(t('Error creating security policy stream.'));
watchdog(t("Fedora_Repository"), t("Error creating security policy stream, could not parse collection policy template file."), NULL, WATCHDOG_NOTICE);
watchdog(t("Fedora_Repository"), "Error creating security policy stream, could not parse collection policy template file.", NULL, WATCHDOG_NOTICE);
return FALSE;
}
@ -183,7 +183,7 @@ class FormBuilder {
file_delete($form_values['ingest-file-location']);
} catch (exception $e) {
drupal_set_message(t('Error ingesting object: !e', array('!e' => $e->getMessage())), 'error');
watchdog(t("Fedora_Repository"), t("Error ingesting object: !e", array('!e' => $e->getMessage())), NULL, WATCHDOG_ERROR);
watchdog(t("Fedora_Repository"), "Error ingesting object: !e", array('!e' => $e->getMessage()), NULL, WATCHDOG_ERROR);
return;
}
}

9
plugins/ModsFormBuilder.inc

@ -22,9 +22,9 @@ class ModsFormBuilder extends FormBuilder {
* Constructor
* @param type $pid
*/
function __construct($pid=null) {
function __construct($pid=NULL) {
parent::__construct();
if ($pid !== null) {
if ($pid !== NULL) {
module_load_include('inc', 'fedora_repository', 'ContentModel');
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
@ -87,7 +87,7 @@ class ModsFormBuilder extends FormBuilder {
'#type' => $element['type']
);
$includeEl = true;
$includeEl = TRUE;
$elname = explode('][', $element['name']);
$elLocation = &$form['indicator2'];
while (isset($elLocation[$name[0]]) && ($partial = array_shift($elname)) != NULL) {
@ -317,7 +317,7 @@ class ModsFormBuilder extends FormBuilder {
file_delete($form_values['ingest-file-location']);
} catch (exception $e) {
drupal_set_message(t('Error ingesting object: !e', array('!e' => $e->getMessage())), 'error');
watchdog(t("Fedora_Repository"), t("Error ingesting object: !e", array('!e' => $e->getMessage())), NULL, WATCHDOG_ERROR);
watchdog(t("Fedora_Repository"), "Error ingesting object: !e", array('!e' => $e->getMessage()), NULL, WATCHDOG_ERROR);
return;
}
}
@ -679,7 +679,6 @@ class ModsFormBuilder extends FormBuilder {
$modifications = trim($form_values['mods_cc']['cc']['cc_modifications']);
$jurisdiction = trim($form_values['mods_cc']['cc']['cc_jurisdiction']);
// Include islandora form elements only if needed ??
module_load_include('inc', 'islandora_form_elements', 'includes/creative_commons.inc');
if (!isset(CreativeCommons::$cc_jurisdiction_vals[$jurisdiction]))

4
plugins/PersonalCollectionClass.inc

@ -83,7 +83,7 @@ class PersonalCollectionClass {
if (!$policyElement) {
drupal_set_message(t('Error parsing policy stream.'));
watchdog(t("Fedora_Repository"), t("Error parsing policy stream, could not parse policy stream."), NULL, WATCHDOG_NOTICE);
watchdog(t("Fedora_Repository"), "Error parsing policy stream, could not parse policy stream.", NULL, WATCHDOG_NOTICE);
return FALSE;
}
$dom->importNode($policyElement, TRUE);
@ -91,7 +91,7 @@ class PersonalCollectionClass {
$value = $policyElement->appendXML($collectionTemplate);
if (!$value) {
drupal_set_message(t('Error creating collection policy stream.'));
watchdog(t("Fedora_Repository"), t("Error creating collection policy stream, could not parse collection policy template file."), NULL, WATCHDOG_NOTICE);
watchdog(t("Fedora_Repository"), "Error creating collection policy stream, could not parse collection policy template file.", NULL, WATCHDOG_NOTICE);
return FALSE;
}

4
plugins/Refworks.inc

@ -83,7 +83,7 @@ class Refworks {
//$dom = dom_import_simplexml($xml);//test to see if it behaves better
//$xml = new SimpleXMLElement(trim(file_get_contents($file)));
} catch (Exception $e) {
drupal_set_message(t('Error processing Refworks file: ') . $e->getMessage());
drupal_set_message(t('Error processing Refworks file:') . " " . $e->getMessage());
return FALSE;
}
$this->referenceList = array();
@ -290,7 +290,7 @@ class Refworks {
if ($client == NULL) {
drupal_set_message(t('Error getting SOAP client.'), 'error');
watchdog(t("FEDORA_REPOSITORY"), t("Error getting SOAP client: !e", array('!e' => $e)), NULL, WATCHDOG_ERROR);
watchdog(t("FEDORA_REPOSITORY"), "Error getting SOAP client: !e", array('!e' => $e), NULL, WATCHDOG_ERROR);
return;
}
$object = $client->__soapCall('ingest', array(

2
plugins/ShowDemoStreamsInFieldSets.inc

@ -11,6 +11,7 @@
* Show Demo Streams in Field Sets ???
*/
class ShowDemoStreamsInFieldSets {
private $pid = NULL;
/**
@ -36,4 +37,5 @@ class ShowDemoStreamsInFieldSets {
);
return theme('fieldset', $collection_fieldset);
}
}

10
plugins/fedora_attach/fedora_attach.admin.inc

@ -1,12 +1,12 @@
<?php
// $Id$
/**
* @file
* Administration page callbacks for the redmine_issuer module.
*/
/**
* Form builder. Configure Redmine parameters.
*
@ -16,11 +16,11 @@
function fedora_attach_admin() {
$options = drupal_map_assoc(explode(" ", variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: ')));
$default_value = variable_get('fedora_attach_pid_namespace', 'default:');
$isRestricted = variable_get('fedora_namespace_restriction_enforced',TRUE);
$is_restricted = variable_get('fedora_namespace_restriction_enforced', TRUE);
if (!in_array($default_value, $options) && $isRestricted) {
drupal_set_message( "The value last set here ($default_value) is not in the list of available PID namespaces (perhaps it has changed?). Please choose a valid option from the list.", 'warning' );
if (!in_array($default_value, $options) && $is_restricted) {
drupal_set_message(t("The value last set here ($default_value) is not in the list of available PID namespaces (perhaps it has changed?). Please choose a valid option from the list."), 'warning');
}
$form = array();

2
plugins/fedora_attach/fedora_attach.install

@ -1,5 +1,5 @@
<?php
// $Id$
// @file fedora_attach.install

16
plugins/fedora_attach/fedora_attach.module

@ -1,5 +1,6 @@
<?php
// $Id$
/**
* Implementation of hook_perm()
@ -78,8 +79,7 @@ function fedora_attach_nodeapi(&$node, $op, $teaser) {
$success = TRUE;
}
}
catch (exception $e) {
} catch (exception $e) {
drupal_set_message(t('An error occurred ingesting the file: ') . $e, 'error');
$new_item->purge();
drupal_set_message(t('The item has been removed from the repository'));
@ -91,7 +91,6 @@ function fedora_attach_nodeapi(&$node, $op, $teaser) {
}
}
// Convert file to object for compatibility
// Remove file. Process removals first since no further processing
// will be required.
if (!empty($file->remove)) {
@ -109,7 +108,6 @@ function fedora_attach_nodeapi(&$node, $op, $teaser) {
// Move on, so the removed file won't be added to new revisions.
continue;
}
}
}
}
@ -118,7 +116,6 @@ function fedora_attach_nodeapi(&$node, $op, $teaser) {
// ******************************************************
// *** VIEW
// Re-theme the file attachments table.
// Rebuild the files table and overwrite default.
// Using the rules from upload.module.
if (isset($node->files) && count($node->files) && user_access('view uploaded files') && !$teaser) {
@ -143,7 +140,6 @@ function fedora_attach_menu() {
return $items;
}
function fedora_attach_save(&$node) {
print ("FNARF!");
}
@ -237,7 +233,8 @@ function fedora_attach_form_validate($formid, $form_values) {
if ($attach_weight <= $uplaod_weight) {
$new_weight = $upload_weight + 1;
drupal_set_message(t('Adjusting Fedora Attach module\'s weight to') . $new_weight, 'warning');
db_query("UPDATE {system} SET weight = '%d' WHERE name = 'fedora_attach'", $new_weight);;
db_query("UPDATE {system} SET weight = '%d' WHERE name = 'fedora_attach'", $new_weight);
;
}
else {
drupal_set_message(t('Please check for modules that conflict with Fedora Attach'), 'error');
@ -384,8 +381,7 @@ function _fedora_attach_build_roles_form(&$form, $inside_js = FALSE) {
}
function _fedora_attach_create_policy($roles) {
$policy_filename = !empty($roles) ? drupal_get_path('module', 'fedora_repository') . '/policies/viewANDeditbyrole.xml'
: drupal_get_path('module', 'fedora_repository') . '/policies/noObjectEditPolicy.xml';
$policy_filename = !empty($roles) ? drupal_get_path('module', 'fedora_repository') . '/policies/viewANDeditbyrole.xml' : drupal_get_path('module', 'fedora_repository') . '/policies/noObjectEditPolicy.xml';
$policy_document = new DOMDocument();
$policy_document->load($policy_filename);
$designators = $policy_document->getElementsByTagName("SubjectAttributeDesignator");

10
plugins/fedora_imageapi.module

@ -1,5 +1,6 @@
<?php
// $Id$
function fedora_imageapi_menu() {
$items = array();
@ -30,8 +31,7 @@ function fedora_repository_image_manip($pid = '', $dsid = '', $op = '', $params
$safe_pid = str_replace(':', '_', $pid);
$cache_key = 'fedora_repository_image_manip_' . md5($safe_pid . '_' . $dsid . '_' . $ext . '_' . $op . (isset($_GET['width']) ? '_' . $_GET['width'] : '') . (isset($_GET['height']) ? '_' . $_GET['height'] : ''));
if (($file=cache_get($cache_key))===0)
{
if (($file = cache_get($cache_key)) === 0) {
//added the slash as sys_get_temp_dir in linux does not seem to include the slash
$tmp_file_name = sys_get_temp_dir() . '/' . $safe_pid . '_' . $dsid . '.' . $ext;
$handle = fopen($tmp_file_name, "w");
@ -52,14 +52,14 @@ function fedora_repository_image_manip($pid = '', $dsid = '', $op = '', $params
case 'centerscale':
if (!empty($_GET['height']) && !empty($_GET['width'])) {
imageapi_image_scale_and_crop($image, $_GET['width'], $_GET['height']);
}
}
imageapi_image_close($image);
$file = file_get_contents($tmp_file_name);
cache_set($cache_key, $file, 'cache', time() + variable_get('fedora_image_blocks_cache_time', 3600));
file_delete($tmp_file_name);
} else {
}
else {
$file = $file->data;
}

20
plugins/herbarium.inc

@ -1,6 +1,9 @@
<?php
// $Id$
/**
* @file
*
*/
/**
* @file
@ -78,7 +81,8 @@ class Herbarium {
$dwc = new DarwinCore($this->item);
$dwc->handleForm($form_values);
$this->item->purge_datastream('DARWIN_CORE');
$this->item->add_datastream_from_string($dwc->darwinCoreXML, 'DARWIN_CORE', 'Darwin Core Metadata', 'text/xml', 'X');
$this->item->add_datastream_from_string($dwc->darwinCoreXML, 'DARWIN_CORE',
'Darwin Core Metadata', 'text/xml', 'X');
return TRUE;
}
@ -104,14 +108,17 @@ class Herbarium {
. $form_values['dwc:collectionCode'] . ':'
. $form_values['dwc:catalogNumber'];
$new_item = Fedora_Item::ingest_new_item($form_values['pid'], 'A', $label, $user->name);
$new_item = Fedora_Item::ingest_new_item($form_values['pid'], 'A', $label,
$user->name);
$new_item->add_datastream_from_string($dwc->darwinCoreXML, 'DARWIN_CORE', 'Darwin Core Metadata', 'text/xml', 'X');
$new_item->add_datastream_from_string($dwc->darwinCoreXML, 'DARWIN_CORE',
'Darwin Core Metadata', 'text/xml', 'X');
$file = $form_values['ingest-file-location'];
if (!empty($file)) {
$dformat = $mimetype->getType($file);
$new_item->add_datastream_from_file($file, 'FULL_SIZE', "$label-full-size", $dformat, 'M');
$new_item->add_datastream_from_file($file, 'FULL_SIZE',
"$label-full-size", $dformat, 'M');
}
$new_item->add_relationship('hasModel', $form_values['content_model_pid'], FEDORA_MODEL_URI);
@ -121,7 +128,8 @@ class Herbarium {
foreach ($_SESSION['fedora_ingest_files'] as $dsid => $created_file) {
$created_file_format = $mimetype->getType($created_file);
$created_filename = strstr($created_file, $file);
$new_item->add_datastream_from_file($created_file, $dsid, $created_filename, $created_file_format, 'M');
$new_item->add_datastream_from_file($created_file, $dsid,
$created_filename, $created_file_format, 'M');
}
}
}

7
plugins/islandora_newspaper/Newspaper.inc

@ -1,6 +1,8 @@
<?php
// $Id$
/* @file
* News Paper Plugin for Fedora Repository module.
*/
class Newspaper {
@ -32,7 +34,6 @@ class Newspaper {
'#type' => 'textarea',
'#title' => 'MODS Record to Import',
'#rows' => 20,
);
return $form;
@ -84,7 +85,6 @@ class Newspaper {
$new_item->add_relationship('hasModel', $form_values['content_model_pid'], FEDORA_MODEL_URI);
$new_item->add_relationship(!empty($form_values['relationship']) ? $form_values['relationship'] : 'isMemberOfCollection', $form_values['collection_pid']);
drupal_set_message(t("Item !pid created successfully.", array('!pid' => l($new_item->pid, 'fedora/repository/' . $new_item->pid))), "status");
}
public function showFieldSets() {
@ -173,4 +173,5 @@ class Newspaper {
return $tabset;
}
}

1
plugins/islandora_newspaper/newspapers_collection_policy.xml

@ -1,3 +1,4 @@
<collection_policy xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model dsid="ISLANDORACM" name="Newspaper" namespace="islandora" pid="newspapers:issueCModel"></content_model>

3
plugins/islandora_newspaper/newspapers_guardian.xml

@ -175,7 +175,8 @@
The tone of the newspaper changed during the first decade of the twentieth century; its news coverage became more sensational and its editorials offered less political commentary. Special weekend issues were printed during the second half of this decade, featuring comic strips, housekeeping articles, popular songs, sermons, local history and Sunday School lessons. Photographs and line drawings appeared frequently during the final years of the decade.
.... more in Heather Boylan ... p.54-Checklist and Historical Directory of Prince Edward Island Newspapers.</dc:description>
.... more in Heather Boylan ... p.54-Checklist and Historical Directory of Prince Edward Island Newspapers.
</dc:description>
<dc:description>Title varies: 1887- , The Island guardian; Dec. 1890-Jan. 1891, The Daily guardian; Jan. 1891- , The Morning guardian.</dc:description>
<dc:description>Ceased publication in 1920?</dc:description>
<dc:description>Missing issues.</dc:description>

1
plugins/islandora_newspaper/newspapers_issueCModel_islandoracm.xml

@ -1,3 +1,4 @@
<content_model name="Newspaper" xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd" version="2">
<mimetypes>
<type>text/xml</type>

3
plugins/pidfield/pidfield.install

@ -1,5 +1,6 @@
<?php
// $Id$
/**
* @file

10
plugins/pidfield/pidfield.module

@ -1,5 +1,6 @@
<?php
// $Id$
/**
* @file
@ -9,7 +10,6 @@
* declare what kind of field they work with, which can be any
* existing field as well as any new field the module creates.
*/
//==========================================//
// DEFINING A FIELD
//==========================================//
@ -50,7 +50,6 @@ function pidfield_field_settings($op, $field) {
'#title' => t('Maximum length'),
'#default_value' => is_numeric($field['max_length']) ? $field['max_length'] : 64,
'#required' => FALSE,
// Use #element_validate to validate the settings.
'#element_validate' => array('_pidfield_length_validate'),
'#description' => t('The maximum length of the field in characters. Must be a number between 1 and 255'),
@ -128,7 +127,8 @@ function pidfield_field($op, &$node, $field, &$items, $teaser, $page) {
// set an error on the right sub-element when
// fields are deeply nested in the form.
$error_element = isset($item['_error_element']) ? $item['_error_element'] : '';
if (is_array($item) && isset($item['_error_element'])) unset($item['_error_element']);
if (is_array($item) && isset($item['_error_element']))
unset($item['_error_element']);
if (!empty($item['value'])) {
if (!empty($field['max_length']) && drupal_strlen($item['value']) > $field['max_length']) {
form_set_error($error_element, t('%name: the value may not be longer than %max characters.', array('%name' => $field['widget']['label'], '%max' => $field['max_length'])));
@ -444,11 +444,9 @@ function get_node_references_for_fedora_item($item) {
$results[] = $data->nid;
//$referred_node = node_load(array('nid'=>$data->nid) );
}
return $results;
}
}
function fedora_pidfield_redirect_to_node($item) {

26
plugins/qt_viewer.inc

@ -47,7 +47,7 @@ class ShowQtStreamsInFieldSets {
$doc->registerXPathNamespace('Composite', 'http://ns.exiftool.ca/Composite/1.0/');
$mime = reset($doc->xpath('//File:MIMEType'));
$data['mime'] = $mime;
if (strpos($mime, 'audio/') !== false) {
if (strpos($mime, 'audio/') !== FALSE) {
$data['width'] = 300;
$data['height'] = 0;
}
@ -73,8 +73,8 @@ class ShowQtStreamsInFieldSets {
*/
function getPosterFrameDatastreamInfo($dsid = 'FULL_SIZE') {
$p = ObjectHelper::getDatastreamInfo($this->pid, $dsid);
if (empty($p) || $p == ' ' || $p === false) {
return false;
if (empty($p) || $p == ' ' || $p === FALSE) {
return FALSE;
}
return $p;
}
@ -87,12 +87,12 @@ class ShowQtStreamsInFieldSets {
*/
function getMediaDatastreamInfo($dsid = 'OBJ', $alt = array('')) {
$p = ObjectHelper::getDatastreamInfo($this->pid, $dsid);
if (empty($p) || $p == ' ' || $p === false) {
if (empty($p) || $p == ' ' || $p === FALSE) {
if (!empty($alt)) {
$ds = array_shift($alt);
return $this->getMediaDatastreamInfo($ds, $alt);
}
return false;
return FALSE;
}
return $p;
@ -103,7 +103,7 @@ class ShowQtStreamsInFieldSets {
* @return FALSE
*/
function enableDownload() {
return false;
return FALSE;
}
/**
@ -122,7 +122,7 @@ class ShowQtStreamsInFieldSets {
$pframe = $this->getPosterFrameDatastreamInfo();
$media = $this->getMediaDatastreamInfo('PROXY', array('OBJ'));
if ($media === false) {
if ($media === FALSE) {
return '';
}
global $base_url;
@ -134,7 +134,7 @@ class ShowQtStreamsInFieldSets {
$divid = 'player' . md5($this->pid) . 'MOV';
$content .= '<div class="player" id="' . $divid . '">';
if ($pframe !== false) {
if ($pframe !== FALSE) {
$content .= '<div class="poster" style="cursor: pointer; position: relative; width: ' . $width . 'px; min-height: ' . ($height) . 'px;">';
$content .= '<img src="' . base_path() . 'fedora/repository/' . $this->pid . '/' . $pframe->ID . '/poster.jpg' . '" />';
$content .= '<div class="play" style="font-size: 128px; color: white; position: absolute; top: 50%; left: 50%; margin-top: -0.085em; margin-left: -0.33em; opacity: 0.9; "></div>';
@ -147,7 +147,7 @@ class ShowQtStreamsInFieldSets {
}
$src = base_path() . 'fedora/repository/' . $this->pid . '/' . $media->ID . '/MOV.mov';
$qtparams = '';
$qtparams .= "'autostart', '" . ($pframe !== false ? 'true' : 'false') . "', ";
$qtparams .= "'autostart', '" . ($pframe !== FALSE ? 'true' : 'false') . "', ";
$init = <<<EOD
$(function() {
src = "$src";
@ -156,12 +156,12 @@ class ShowQtStreamsInFieldSets {
}
str = QT_GenerateOBJECTText_XHTML(src, "$width", ($height+15), '',
$qtparams
'postdomevents', 'true',
'EnableJavaScript', 'true',
'postdomevents', 'TRUE',
'EnableJavaScript', 'TRUE',
'bgcolor', 'black',
'controller', 'true',
'controller', 'TRUE',
'SCALE', 'aspect',
'LOOP', 'false'
'LOOP', 'FALSE'
);
if($('.poster', '#$divid').length ==0) {
$('#$divid').append(str);

5
tests/fedora_repository.test

@ -1,8 +1,7 @@
<?php
// $Id$
/*
/* @file
* Tests the functions of the Fedora Repository module.
*/
@ -153,7 +152,7 @@ class FedoraRepositoryTestCase extends DrupalWebTestCase {
}
$output_path = "$file_dir/$basename." . $this->randomName(10) . '.html';
$rv = file_put_contents($output_path, $this->drupalGetContent());
$this->pass("$description: Contents of result page are " . l('here', $output_path));
$this->pass("$description: Contents of result page are " . l(t('here'), $output_path));
}
protected function drupalCreateFedoraUser($permissions = array('access comments', 'access content', 'post comments', 'post comments without approval')) {

95
xsl/advanced_search_results.xsl

@ -55,8 +55,12 @@
}
</style>
Total Hits = <strong><xsl:value-of select="@hitTotal"/>,</strong>
Number of Hits/page = <xsl:value-of select="$HITPAGESIZE"/>
Total Hits =
<strong>
<xsl:value-of select="@hitTotal"/>,
</strong>
Number of Hits/page =
<xsl:value-of select="$HITPAGESIZE"/>
<br />You may not have sufficient privileges to view any or all of the items found. The objects you have rights to view will be shown below.
<!-- Current page = <xsl:value-of select="@hitPageStart"/>-->
<br/>
@ -66,15 +70,24 @@
<xsl:if test="$HITPAGENO > 1">
<li class="pager-previous">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/mnpl_advanced_search/<xsl:value-of select="$QUERY"/>/<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/mnpl_advanced_search/
<xsl:value-of select="$QUERY"/>/
<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/>
</xsl:attribute>
&lt; Previous
</a>
</li>
</xsl:if><xsl:text> </xsl:text>
</xsl:if>
<xsl:text> </xsl:text>
<xsl:if test="$HITPAGENO &lt; $HITPAGENOLAST">
<li class="pager-next">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/mnpl_advanced_search/<xsl:value-of select="$QUERY"/>/<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/mnpl_advanced_search/
<xsl:value-of select="$QUERY"/>/
<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/>
</xsl:attribute>
Next >
</a>
</li>
@ -91,15 +104,24 @@
<xsl:if test="$HITPAGENO > 1">
<li class="pager-previous">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/mnpl_advanced_search/<xsl:value-of select="$QUERY"/>/<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/mnpl_advanced_search/
<xsl:value-of select="$QUERY"/>/
<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/>
</xsl:attribute>
&lt; Previous
</a>
</li>
</xsl:if><xsl:text> </xsl:text>
</xsl:if>
<xsl:text> </xsl:text>
<xsl:if test="$HITPAGENO &lt; $HITPAGENOLAST">
<li class="pager-next">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/mnpl_advanced_search/<xsl:value-of select="$QUERY"/>/<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/mnpl_advanced_search/
<xsl:value-of select="$QUERY"/>/
<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/>
</xsl:attribute>
Next >
</a>
</li>
@ -113,12 +135,21 @@
<h2>Your search yielded no results</h2>
<div class="content"><ul>
<div class="content">
<ul>
<li>Check if your spelling is correct.</li>
<li>Remove quotes around phrases to match each word individually: <em>"blue smurf"</em> will match less than <em>blue smurf</em>.</li>
<li>Consider loosening your query with <em>OR</em>: <em>blue smurf</em> will match less than <em>blue OR smurf</em>.</li>
</ul></div>
<li>Remove quotes around phrases to match each word individually:
<em>"blue smurf"</em> will match less than
<em>blue smurf</em>.
</li>
<li>Consider loosening your query with
<em>OR</em>:
<em>blue smurf</em> will match less than
<em>blue OR smurf</em>.
</li>
</ul>
</div>
</div>
@ -131,7 +162,8 @@
<table><div class="search-results">
<table>
<div class="search-results">
<xsl:for-each select="object">
<xsl:variable name="PIDVALUE">
<xsl:choose>
@ -155,7 +187,8 @@
</xsl:for-each>
</div></table>
</div>
</table>
</xsl:template>
<xsl:template name="splitBySpace">
@ -210,9 +243,13 @@
<xsl:variable name="CLEANTITLE">
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $DCTITLE)"/>
</xsl:variable>
<tr><td valign="top">
<tr>
<td valign="top">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:copy-of select="$PIDVALUE"/>/-/<xsl:value-of select="$CLEANTITLE"/>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PIDVALUE"/>/-/
<xsl:value-of select="$CLEANTITLE"/>
</xsl:attribute>
<!--<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/><![CDATA[&pid=]]><xsl:value-of select="$PIDVALUE"/><![CDATA[&collection=object]]>
@ -225,7 +262,9 @@
</img>-->
<img>
<xsl:attribute name="src"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:copy-of select="$PIDVALUE"/>/TN
<xsl:attribute name="src">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PIDVALUE"/>/TN
</xsl:attribute>
</img>
</a>
@ -249,20 +288,29 @@
<a>
<!--<xsl:attribute name="href"><![CDATA[http://localhost/drupal-5.1/?q=node/7&pid=]]><xsl:value-of select="$PIDVALUE"/><![CDATA[&collection=object]]>-->
<!--<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/><![CDATA[&pid=]]><xsl:value-of select="$PIDVALUE"/><![CDATA[&collection=object]]>-->
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:value-of select="$PIDVALUE"/>/-/<xsl:value-of select="$CLEANTITLE"/>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:value-of select="$PIDVALUE"/>/-/
<xsl:value-of select="$CLEANTITLE"/>
</xsl:attribute>
<xsl:value-of select="$PIDVALUE"/><br />
<xsl:value-of select="$PIDVALUE"/>
<br />
</a>
<span class="searchtitle">
<span >
Score:(<xsl:value-of select="@score"/>)
</span><br />
Score:(
<xsl:value-of select="@score"/>)
</span>
<br />
<a>
<!--<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/><![CDATA[&pid=]]><xsl:value-of select="$PIDVALUE"/><![CDATA[&collection=object]]>-->
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:value-of select="$PIDVALUE"/>/-/<xsl:value-of select="$CLEANTITLE"/>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:value-of select="$PIDVALUE"/>/-/
<xsl:value-of select="$CLEANTITLE"/>
</xsl:attribute>
<xsl:value-of select="field[@name='dc.title']/node()" disable-output-escaping="yes"/>
@ -316,7 +364,8 @@
</table>
</td></tr>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>

541
xsl/browseIndexToResultPage.xslt

@ -32,165 +32,271 @@
termPageSize="{$TERMPAGESIZE}"
resultPageXslt="{$RESULTPAGEXSLT}"
termTotal="{$TERMTOTAL}">
<h3><xsl:value-of select="$DISPLAYNAME"/></h3>
<h3>
<xsl:value-of select="$DISPLAYNAME"/>
</h3>
<!--start pager Div-->
<!--Start letters -->
<div class="item-list">
<ul class="pager">
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/A/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> A </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/A/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> A </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/B/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> B </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/B/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> B </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/C/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> C </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/C/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> C </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/D/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> D </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/D/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> D </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/E/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> E </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/E/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> E </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/F/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> F </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/F/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> F </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/G/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> G </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/G/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> G </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/H/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> H </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/H/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> H </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/I/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> I </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/I/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> I </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/J/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> J </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/J/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> J </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/K/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> K </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/K/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> K </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/L/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> L </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/L/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> L </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/M/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> M </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/M/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> M </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/N/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> N </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/N/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> N </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/O/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> O </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/O/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> O </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/P/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> P </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/P/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> P </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/Q/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> Q </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/Q/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> Q </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/R/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> R </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/R/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> R </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/S/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> S </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/S/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> S </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/T/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> T </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/T/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> T </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/U/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> U </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/U/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> U </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/V/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> V </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/V/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> V </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/W/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> W </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/W/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> W </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/X/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> X </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/X/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> X </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/Y/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> Y </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/Y/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> Y </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/Z/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> Z </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/Z/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> Z </span>
</a>
</li>
<!--End letters-->
@ -198,14 +304,18 @@
<li class="pager-next">
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/<xsl:value-of select="$PAGELASTTERM"/>/<xsl:value-of select="$DISPLAYNAME"/>
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/
<xsl:value-of select="$PAGELASTTERM"/>/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> >>
</a>
</li>
</ul>
</div>
<!--End pager Div-->
<br /><br />
<br />
<br />
<xsl:apply-templates select="terms"/>
<br />
<!--start pager Div-->
@ -213,159 +323,263 @@
<div class="item-list">
<ul class="pager">
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/A/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> A </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/A/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> A </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/B/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> B </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/B/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> B </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/C/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> C </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/C/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> C </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/D/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> D </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/D/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> D </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/E/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> E </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/E/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> E </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/F/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> F </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/F/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> F </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/G/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> G </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/G/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> G </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/I/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> H </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/I/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> H </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/I/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> I </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/I/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> I </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/J/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> J </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/J/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> J </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/K/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> K </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/K/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> K </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/L/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> L </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/L/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> L </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/M/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> M </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/M/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> M </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/N/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> N </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/N/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> N </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/O/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> O </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/O/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> O </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/P/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> P </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/P/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> P </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/Q/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> Q </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/Q/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> Q </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/R/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> R </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/R/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> R </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/S/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> S </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/S/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> S </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/T/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> T </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/T/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> T </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/U/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> U </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/U/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> U </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/V/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> V </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/V/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> V </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/W/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> W </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/W/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> W </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/X/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> X </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/X/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> X </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/Y/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> Y </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/Y/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> Y </span>
</a>
</li>
<li class="pager-item">
<a> <xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/Z/<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> <span class="letter"> Z </span>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/Z/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute>
<span class="letter"> Z </span>
</a>
</li>
<!--End letters-->
@ -373,7 +587,10 @@
<li class="pager-next">
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/<xsl:value-of select='$FIELDNAME'/>/<xsl:value-of select="$PAGELASTTERM"/>/<xsl:value-of select="$DISPLAYNAME"/>
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/list_terms/
<xsl:value-of select='$FIELDNAME'/>/
<xsl:value-of select="$PAGELASTTERM"/>/
<xsl:value-of select="$DISPLAYNAME"/>
</xsl:attribute> >>
</a>
</li>
@ -393,7 +610,9 @@
<!-- <xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/mnpl_advanced_search/<xsl:value-of select='$FIELDNAME'/>:"<xsl:value-of select="."/>" AND dc.type:collection
the commented out url is for general use the one below is for islandlives book view-->
<xsl:variable name="SHORTFIELDNAME" select="substring-before($FIELDNAME,'TERM')"/>
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/<xsl:value-of select='$SHORTFIELDNAME'/>:"<xsl:value-of select="."/>" AND dc.type:collection
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/
<xsl:value-of select='$SHORTFIELDNAME'/>:"
<xsl:value-of select="."/>" AND dc.type:collection
</xsl:attribute>
<xsl:value-of select="."/>
</a>

34
xsl/convertQDC.xsl

@ -8,24 +8,46 @@
</xsl:variable>
<xsl:template match="/">
<div><table cellspacing="3" cellpadding="3"><tbody>
<tr><th colspan="3"><h3>MetaData</h3></th></tr>
<div>
<table cellspacing="3" cellpadding="3">
<tbody>
<tr>
<th colspan="3">
<h3>MetaData</h3>
</th>
</tr>
<xsl:for-each select="/*/*">
<xsl:variable name="FULLFIELD" select="name()"/>
<xsl:variable name="FIELD" select="substring-after(name(),':')"/>
<xsl:variable name="DATA" select="text()"/>
<xsl:if test="$DATA != ' '">
<tr><td><strong><xsl:value-of select="substring-after(name(),':')"/></strong></td><td><xsl:value-of select="text()"/>
<tr>
<td>
<strong>
<xsl:value-of select="substring-after(name(),':')"/>
</strong>
</td>
<td>
<xsl:value-of select="text()"/>
<xsl:for-each select="*">
<div>
<xsl:value-of select="substring-after(name(),':')"/> = <xsl:value-of select="text()"/>
<xsl:value-of select="substring-after(name(),':')"/> =
<xsl:value-of select="text()"/>
</div>
</xsl:for-each>
</td><td><a href="{$baseUrl}/search/fedora_repository/dc.{$FIELD}:{$DATA}"><img title="Find Similar by {$FIELD}" src="{$PATH}/images/view.gif" alt="Find Similar by {$FIELD}" /></a></td></tr>
</td>
<td>
<a href="{$baseUrl}/search/fedora_repository/dc.{$FIELD}:{$DATA}">
<img title="Find Similar by {$FIELD}" src="{$PATH}/images/view.gif" alt="Find Similar by {$FIELD}" />
</a>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</tbody></table></div>
</tbody>
</table>
</div>
</xsl:template>

174
xsl/refworks.xsl

@ -6,27 +6,127 @@
<xsl:if test="/reference/jf">
<h2>General Information</h2>
<table cellpadding="2" cellspacing="2">
<tr><td ><strong>Periodical:</strong></td><td><xsl:value-of select="/reference/jf"/></td></tr>
<tr><td><strong>Abbreviation:</strong></td><td><xsl:value-of select="/reference/jo"/></td></tr>
<tr><td><strong>Volume:</strong></td><td><xsl:value-of select="/reference/vo"/></td></tr>
<tr><td><strong>Issue:</strong></td><td><xsl:value-of select="/reference/is"/></td></tr>
<tr><td><strong>Publisher:</strong></td><td><xsl:value-of select="/reference/pb"/></td></tr>
<tr><td><strong>Place of Publication:</strong></td><td><xsl:value-of select="/reference/pp"/></td></tr>
<tr><td><strong>Edition:</strong></td><td><xsl:value-of select="/reference/ed"/></td></tr>
<tr><td><strong>Year:</strong></td><td><xsl:value-of select="/reference/yr"/></td></tr>
<tr><td><strong>Date:</strong></td><td><xsl:value-of select="/reference/fd"/></td></tr>
<tr><td><strong>Start Page:</strong></td><td><xsl:value-of select="/reference/sp"/></td></tr>
<tr><td><strong>Other Pages:</strong></td><td><xsl:value-of select="/reference/op"/></td></tr>
<tr><td><strong>ISSN/ISBN:</strong></td><td><xsl:value-of select="/reference/sn"/></td></tr>
<tr><td><strong>Language:</strong></td><td><xsl:value-of select="/reference/la"/></td></tr>
<tr><td><strong>UL:</strong></td><td><xsl:value-of select="/reference/ul"/></td></tr>
<tr>
<td >
<strong>Periodical:</strong>
</td>
<td>
<xsl:value-of select="/reference/jf"/>
</td>
</tr>
<tr>
<td>
<strong>Abbreviation:</strong>
</td>
<td>
<xsl:value-of select="/reference/jo"/>
</td>
</tr>
<tr>
<td>
<strong>Volume:</strong>
</td>
<td>
<xsl:value-of select="/reference/vo"/>
</td>
</tr>
<tr>
<td>
<strong>Issue:</strong>
</td>
<td>
<xsl:value-of select="/reference/is"/>
</td>
</tr>
<tr>
<td>
<strong>Publisher:</strong>
</td>
<td>
<xsl:value-of select="/reference/pb"/>
</td>
</tr>
<tr>
<td>
<strong>Place of Publication:</strong>
</td>
<td>
<xsl:value-of select="/reference/pp"/>
</td>
</tr>
<tr>
<td>
<strong>Edition:</strong>
</td>
<td>
<xsl:value-of select="/reference/ed"/>
</td>
</tr>
<tr>
<td>
<strong>Year:</strong>
</td>
<td>
<xsl:value-of select="/reference/yr"/>
</td>
</tr>
<tr>
<td>
<strong>Date:</strong>
</td>
<td>
<xsl:value-of select="/reference/fd"/>
</td>
</tr>
<tr>
<td>
<strong>Start Page:</strong>
</td>
<td>
<xsl:value-of select="/reference/sp"/>
</td>
</tr>
<tr>
<td>
<strong>Other Pages:</strong>
</td>
<td>
<xsl:value-of select="/reference/op"/>
</td>
</tr>
<tr>
<td>
<strong>ISSN/ISBN:</strong>
</td>
<td>
<xsl:value-of select="/reference/sn"/>
</td>
</tr>
<tr>
<td>
<strong>Language:</strong>
</td>
<td>
<xsl:value-of select="/reference/la"/>
</td>
</tr>
<tr>
<td>
<strong>UL:</strong>
</td>
<td>
<xsl:value-of select="/reference/ul"/>
</td>
</tr>
</table>
</xsl:if>
<xsl:if test="/reference/t1">
<h2>Titles</h2>
<ul>
<xsl:for-each select="/reference/t1">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -34,7 +134,9 @@
<ul>
<h3>Secondary Titles</h3>
<xsl:for-each select="/reference/t2">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -42,7 +144,9 @@
<h2>Authors</h2>
<ul>
<xsl:for-each select="/reference/a1">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -51,7 +155,9 @@
<ul>
<h3>Secondary Authors</h3>
<xsl:for-each select="/reference/a2">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -59,34 +165,52 @@
<h2>Keywords</h2>
<ul>
<xsl:for-each select="/reference/k1">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="/reference/ab">
<h2>Abstract</h2>
<xsl:for-each select="/reference/ab">
<div><xsl:value-of select="."/> </div>
<div>
<xsl:value-of select="."/>
</div>
</xsl:for-each>
</xsl:if>
<xsl:if test="/reference/no">
<h2>Notes</h2>
<xsl:for-each select="/reference/no">
<div><xsl:value-of select="."/> </div>
<div>
<xsl:value-of select="."/>
</div>
</xsl:for-each>
</xsl:if>
<xsl:variable name="ISSN">
<xsl:value-of select="/reference/sn"/>
</xsl:variable>
<xsl:variable name="BASEURL">
http://articles.library.upei.ca:7888/godot/hold_tab.cgi?hold_tab_branch=PCU&amp;issn=<xsl:value-of select="/reference/sn/text()"/>&amp;date=<xsl:value-of select="/reference/yr/text()"/>&amp;volume=<xsl:value-of select="/reference/vo/text()"/>&amp;issue=<xsl:value-of select="/reference/is/text()"/>&amp;spage=<xsl:value-of select="/reference/sp/text()"/>&amp;atitle=<xsl:value-of select="/reference/t1"/>&amp;stitle=<xsl:value-of select="/reference/jf"/>
http://articles.library.upei.ca:7888/godot/hold_tab.cgi?hold_tab_branch=PCU&amp;issn=
<xsl:value-of select="/reference/sn/text()"/>&amp;date=
<xsl:value-of select="/reference/yr/text()"/>&amp;volume=
<xsl:value-of select="/reference/vo/text()"/>&amp;issue=
<xsl:value-of select="/reference/is/text()"/>&amp;spage=
<xsl:value-of select="/reference/sp/text()"/>&amp;atitle=
<xsl:value-of select="/reference/t1"/>&amp;stitle=
<xsl:value-of select="/reference/jf"/>
</xsl:variable>
<br />
<xsl:if test="/reference/sn">
<div><a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/></xsl:attribute>
<div>
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<img src="http://asin1.its.unb.ca:8000/muse/images/getit4.gif"/> </a></div>
<img src="http://asin1.its.unb.ca:8000/muse/images/getit4.gif"/>
</a>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

75
xsl/romeo.xsl

@ -2,28 +2,81 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- romeo XSLT -->
<xsl:template match="/">
<table cellpadding="3" cellspacing="3"><tr><td>
<b>Journal: </b></td><td><xsl:value-of select="/romeoapi/journals/journal/jtitle"/></td></tr>
<tr><td><b>Published By: </b></td><td><xsl:value-of select="/romeoapi/journals/journal/zetocpub"/><br /></td></tr>
<tr><td><b>Publisher Url:</b></td><td><xsl:value-of select="/romeoapi/publishers/publisher/homeurl"/></td></tr>
<tr><td><b>Prearchiving:</b></td><td><xsl:value-of select="/romeoapi/publishers/publisher/preprints/prearchiving"/></td></tr>
<tr><td><b>Postprints:</b></td><td><xsl:value-of select="/romeoapi/publishers/publisher/postprints/postarchiving"/></td></tr>
<table cellpadding="3" cellspacing="3">
<tr>
<td>
<b>Journal: </b>
</td>
<td>
<xsl:value-of select="/romeoapi/journals/journal/jtitle"/>
</td>
</tr>
<tr>
<td>
<b>Published By: </b>
</td>
<td>
<xsl:value-of select="/romeoapi/journals/journal/zetocpub"/>
<br />
</td>
</tr>
<tr>
<td>
<b>Publisher Url:</b>
</td>
<td>
<xsl:value-of select="/romeoapi/publishers/publisher/homeurl"/>
</td>
</tr>
<tr>
<td>
<b>Prearchiving:</b>
</td>
<td>
<xsl:value-of select="/romeoapi/publishers/publisher/preprints/prearchiving"/>
</td>
</tr>
<tr>
<td>
<b>Postprints:</b>
</td>
<td>
<xsl:value-of select="/romeoapi/publishers/publisher/postprints/postarchiving"/>
</td>
</tr>
</table>
<h2>Conditions</h2>
<ul>
<xsl:for-each select="romeoapi/publishers/publisher/conditions/condition">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
<span><b>Rights: </b><xsl:value-of select="/romeoapi/publishers/publisher/copyright/text()" disable-output-escaping="yes"/></span><br />
<span>
<b>Rights: </b>
<xsl:value-of select="/romeoapi/publishers/publisher/copyright/text()" disable-output-escaping="yes"/>
</span>
<br />
<xsl:variable name="COLOR">
<xsl:value-of select="/romeoapi/publishers/publisher/romeocolour"/>
</xsl:variable>
<span STYLE="background-color: light{$COLOR}"><b>Romeo Colour: </b><xsl:value-of select="/romeoapi/publishers/publisher/romeocolour"/></span><br />
<div align="right"><a href="http://www.sherpa.ac.uk/romeo.php"><img src="http://www.sherpa.ac.uk/images/romeotiny.gif"/></a></div>
<span STYLE="background-color: light{$COLOR}">
<b>Romeo Colour: </b>
<xsl:value-of select="/romeoapi/publishers/publisher/romeocolour"/>
</span>
<br />
<div align="right">
<a href="http://www.sherpa.ac.uk/romeo.php">
<img src="http://www.sherpa.ac.uk/images/romeotiny.gif"/>
</a>
</div>
<xsl:if test = "count(/romeoapi/publishers/publisher/homeurl) &lt; 1">
<div>If there are no results from <strong>ROMEO</strong> shown above you can try searching manually by clicking <a href="http://www.sherpa.ac.uk/romeo.php" target="_blank">here</a>.</div>
<div>If there are no results from
<strong>ROMEO</strong> shown above you can try searching manually by clicking
<a href="http://www.sherpa.ac.uk/romeo.php" target="_blank">here</a>.
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

162
xsl/sparql_to_html.xsl

@ -18,59 +18,93 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<!-- <div STYLE="text-align: center;">-->
<!-- start previous next -->
<div class="item-list">
<ul class="pager">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<li class="pager-previous">
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;Prev
</a></li>
</a>
</li>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<li class="pager-next">
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>
</a></li>
</a>
</li>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<li class="pager-previous">
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;Prev
</a>&#160;</li>
</a>&#160;
</li>
<li class="pager-next">
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>
</a></li>
</a>
</li>
</xsl:otherwise>
</xsl:choose>
</ul>
</div>
<!-- end previous next-->
<br clear="all" />
</td></tr>
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -91,51 +125,84 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="s:sparql/s:results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<!-- start previous next -->
<div class="item-list">
<ul class="pager">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<li class="pager-previous">
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;Prev
</a></li>
</a>
</li>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<li class="pager-next">
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>
</a></li>
</a>
</li>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<li class="pager-previous">
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;Prev
</a>&#160;</li>
</a>&#160;
</li>
<li class="pager-next">
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>
</a></li>
</a>
</li>
</xsl:otherwise>
</xsl:choose>
</ul>
@ -168,28 +235,39 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="($CONTENTMODEL='islandora:collectionCModel')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="$cleanTitle"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="$cleanTitle"/>
</xsl:when>
<xsl:otherwise>
<!--the below is an example of going straight to a datastream instead of the details page.
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="s:title"/>-->
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="$cleanTitle"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="$cleanTitle"/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="s:content"/>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle" disable-output-escaping="yes"/>
<xsl:attribute name="alt">
<xsl:value-of select="$newTitle" disable-output-escaping="yes"/>
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<xsl:value-of select="$newTitle" disable-output-escaping="yes" />
</a>

165
xsl/specdwc.xsl

@ -12,32 +12,149 @@
<table>
<tr cellpadding="10"><th><b>Specimen</b></th></tr>
<tr class="odd"><td width="200">Scientific Name</td><td><xsl:value-of select="//dwc:scientificName"/></td></tr>
<tr class="even"><td width="200">Family</td><td><xsl:value-of select="//dwc:family"/></td></tr>
<tr class="odd"><td width="200">Genus</td><td><xsl:value-of select="//dwc:genus"/></td></tr>
<tr class="even"><td width="200">Common Name</td><td><xsl:value-of select="//dwc:vernacularName"/></td></tr>
<tr cellpadding="10">
<th>
<b>Specimen</b>
</th>
</tr>
<tr class="odd">
<td width="200">Scientific Name</td>
<td>
<xsl:value-of select="//dwc:scientificName"/>
</td>
</tr>
<tr class="even">
<td width="200">Family</td>
<td>
<xsl:value-of select="//dwc:family"/>
</td>
</tr>
<tr class="odd">
<td width="200">Genus</td>
<td>
<xsl:value-of select="//dwc:genus"/>
</td>
</tr>
<tr class="even">
<td width="200">Common Name</td>
<td>
<xsl:value-of select="//dwc:vernacularName"/>
</td>
</tr>
<tr cellpadding="10"><th><b>Location</b></th></tr>
<tr class="odd"><td width="200">Continent</td><td><xsl:value-of select="//dwc:continent"/></td></tr>
<tr class="even"><td width="200">Country</td><td><xsl:value-of select="//dwc:country"/></td></tr>
<tr class="odd"><td width="200">Country Code</td><td><xsl:value-of select="//dwc:countryCode"/></td></tr>
<tr class="even"><td width="200">State/Province</td><td><xsl:value-of select="//dwc:stateProvince"/></td></tr>
<tr class="odd"><td width="200">County</td><td><xsl:value-of select="//dwc:county"/></td></tr>
<tr class="even"><td width="200">Locality</td><td><xsl:value-of select="//dwc:locality"/></td></tr>
<tr class="odd"><td width="200">Habitat</td><td><xsl:value-of select="//dwc:habitat"/></td></tr>
<tr cellpadding="10">
<th>
<b>Location</b>
</th>
</tr>
<tr class="odd">
<td width="200">Continent</td>
<td>
<xsl:value-of select="//dwc:continent"/>
</td>
</tr>
<tr class="even">
<td width="200">Country</td>
<td>
<xsl:value-of select="//dwc:country"/>
</td>
</tr>
<tr class="odd">
<td width="200">Country Code</td>
<td>
<xsl:value-of select="//dwc:countryCode"/>
</td>
</tr>
<tr class="even">
<td width="200">State/Province</td>
<td>
<xsl:value-of select="//dwc:stateProvince"/>
</td>
</tr>
<tr class="odd">
<td width="200">County</td>
<td>
<xsl:value-of select="//dwc:county"/>
</td>
</tr>
<tr class="even">
<td width="200">Locality</td>
<td>
<xsl:value-of select="//dwc:locality"/>
</td>
</tr>
<tr class="odd">
<td width="200">Habitat</td>
<td>
<xsl:value-of select="//dwc:habitat"/>
</td>
</tr>
<tr cellpadding="10"><th><b>Record</b></th></tr>
<tr class="odd"><td width="200">Record Type</td><td><xsl:value-of select="//dc:type"/></td></tr>
<tr class="even"><td width="200">Language- </td><td><xsl:value-of select="//dc:language"/></td></tr>
<tr class="odd"><td width="100">Record Basis</td><td><xsl:value-of select="//dwc:basisOfRecord"/></td></tr>
<tr class="even"><td width="200">Occurence Remarks</td><td><xsl:value-of select="//dwc:occurenceRemarks"/></td></tr>
<tr class="odd"><td width="200">Occurence ID</td><td><xsl:value-of select="//dwc:occurenceID"/></td></tr>
<tr class="even"><td width="200">Institution Code</td><td><xsl:value-of select="//dwc:institutionCode"/></td></tr>
<tr class="odd"><td width="200">Collection Code</td><td><xsl:value-of select="//dwc:collectionCode"/></td></tr>
<tr class="even"><td width="200">Catalog Number</td><td><xsl:value-of select="//dwc:catalogNumber"/></td></tr>
<tr class="odd"><td width="200">Recorded By</td><td><xsl:value-of select="//dwc:recordedBy"/></td></tr>
<tr class="even"><td width="200">Event Date200</td><td><xsl:value-of select="//dwc:eventDate"/></td></tr>
<tr cellpadding="10">
<th>
<b>Record</b>
</th>
</tr>
<tr class="odd">
<td width="200">Record Type</td>
<td>
<xsl:value-of select="//dc:type"/>
</td>
</tr>
<tr class="even">
<td width="200">Language- </td>
<td>
<xsl:value-of select="//dc:language"/>
</td>
</tr>
<tr class="odd">
<td width="100">Record Basis</td>
<td>
<xsl:value-of select="//dwc:basisOfRecord"/>
</td>
</tr>
<tr class="even">
<td width="200">Occurence Remarks</td>
<td>
<xsl:value-of select="//dwc:occurenceRemarks"/>
</td>
</tr>
<tr class="odd">
<td width="200">Occurence ID</td>
<td>
<xsl:value-of select="//dwc:occurenceID"/>
</td>
</tr>
<tr class="even">
<td width="200">Institution Code</td>
<td>
<xsl:value-of select="//dwc:institutionCode"/>
</td>
</tr>
<tr class="odd">
<td width="200">Collection Code</td>
<td>
<xsl:value-of select="//dwc:collectionCode"/>
</td>
</tr>
<tr class="even">
<td width="200">Catalog Number</td>
<td>
<xsl:value-of select="//dwc:catalogNumber"/>
</td>
</tr>
<tr class="odd">
<td width="200">Recorded By</td>
<td>
<xsl:value-of select="//dwc:recordedBy"/>
</td>
</tr>
<tr class="even">
<td width="200">Event Date200</td>
<td>
<xsl:value-of select="//dwc:eventDate"/>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>

Loading…
Cancel
Save