Browse Source

Merge pull request #28 from bwoodhead/6.x

XML formatting
pull/29/head
Ben Woodhead 13 years ago
parent
commit
1dcb27ad42
  1. BIN
      .CollectionClass.inc.swp
  2. 515
      xsl/advanced_search_results.xsl
  3. 893
      xsl/browseIndexToResultPage.xslt
  4. 72
      xsl/convertQDC.xsl
  5. 298
      xsl/refworks.xsl
  6. 476
      xsl/results.xsl
  7. 101
      xsl/romeo.xsl
  8. 455
      xsl/sparql_to_html.xsl
  9. 177
      xsl/specdwc.xsl
  10. 416
      xsl/unfilteredresults.xsl

BIN
.CollectionClass.inc.swp

Binary file not shown.

515
xsl/advanced_search_results.xsl

@ -1,48 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:php="http://php.net/xsl" exclude-result-prefixes="php">
<xsl:variable name="OBJECTSPAGE">
<xsl:value-of select="$objectsPage"/>
</xsl:variable>
<xsl:variable name="ALLOWEDNAMESPACES" select="$allowedPidNameSpaces"/>
<xsl:variable name="OBJECTSPAGE">
<xsl:value-of select="$objectsPage"/>
</xsl:variable>
<xsl:variable name="ALLOWEDNAMESPACES" select="$allowedPidNameSpaces"/>
<!--<xsl:variable name="PATHTOMAKEIMAGE">
<xsl:value-of select="$pathToMakeImage"/>
</xsl:variable>-->
<xsl:template match="gfindObjects">
<xsl:template match="gfindObjects">
<xsl:variable name="INDEXNAME" select="@indexName"/>
<xsl:variable name="INDEXNAME" select="@indexName"/>
<xsl:variable name="PREQUERY" select="substring-before(@query,':')"/>
<xsl:variable name="PREQUERY" select="substring-before(@query,':')"/>
<!--<xsl:variable name="QUERY" select="substring-after(@query,':')"/>-->
<xsl:variable name="QUERY" select="@query"/>
<xsl:variable name="HITPAGESTART" select="@hitPageStart"/>
<xsl:variable name="HITPAGESIZE" select="@hitPageSize"/>
<xsl:variable name="HITTOTAL" select="@hitTotal"/>
<xsl:variable name="QUERY" select="@query"/>
<xsl:variable name="HITPAGESTART" select="@hitPageStart"/>
<xsl:variable name="HITPAGESIZE" select="@hitPageSize"/>
<xsl:variable name="HITTOTAL" select="@hitTotal"/>
<xsl:variable name="SEARCHURL">
<xsl:variable name="SEARCHURL">
<!--<xsl:value-of select="$searchUrl"/>-->
mnpl_advanced_search
</xsl:variable>
<xsl:variable name="TOKEN">
<xsl:value-of select="$searchToken"/>
</xsl:variable>
<xsl:variable name="HITPAGEEND">
<xsl:choose>
<xsl:when test="$HITPAGESTART + $HITPAGESIZE - 1 > $HITTOTAL">
<xsl:value-of select="$HITTOTAL"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$HITPAGESTART + $HITPAGESIZE - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="HITPAGENO" select="ceiling($HITPAGESTART div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGENOLAST" select="ceiling($HITTOTAL div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGESTARTT" select="(($HITPAGENO - 1) * $HITPAGESIZE + 1)"/>
<xsl:choose>
<xsl:when test="$HITTOTAL > 0">
<style type="text/css">
</xsl:variable>
<xsl:variable name="TOKEN">
<xsl:value-of select="$searchToken"/>
</xsl:variable>
<xsl:variable name="HITPAGEEND">
<xsl:choose>
<xsl:when test="$HITPAGESTART + $HITPAGESIZE - 1 > $HITTOTAL">
<xsl:value-of select="$HITTOTAL"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$HITPAGESTART + $HITPAGESIZE - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="HITPAGENO" select="ceiling($HITPAGESTART div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGENOLAST" select="ceiling($HITTOTAL div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGESTARTT" select="(($HITPAGENO - 1) * $HITPAGESIZE + 1)"/>
<xsl:choose>
<xsl:when test="$HITTOTAL > 0">
<style type="text/css">
span.highlight
{
@ -53,176 +53,143 @@
{
font-weight: bold
}
</style>
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.
</style>
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/>
<xsl:if test="$HITTOTAL > $HITPAGESIZE">
<div class="item-list">
<ul class="pager">
<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>
<br/>
<xsl:if test="$HITTOTAL > $HITPAGESIZE">
<div class="item-list">
<ul class="pager">
<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>
&lt; Previous
</a>
</li>
</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>
</a>
</li>
</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>
Next >
</a>
</li>
</xsl:if>
</ul>
</div>
</xsl:if>
</a>
</li>
</xsl:if>
</ul>
</div>
</xsl:if>
<!--<form action="/drupal-5.1/?q=search/fedora_collections" method="post" id="search-form" class="search-form">-->
<xsl:apply-templates select="objects"/>
<xsl:if test="$HITTOTAL > $HITPAGESIZE">
<div class="item-list">
<ul class="pager">
<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:apply-templates select="objects"/>
<xsl:if test="$HITTOTAL > $HITPAGESIZE">
<div class="item-list">
<ul class="pager">
<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>
&lt; Previous
</a>
</li>
</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>
</a>
</li>
</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>
Next >
</a>
</li>
</xsl:if>
</ul>
</div>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<div class="box">
<h2>Your search yielded no results</h2>
<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>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="objects">
<table>
<div class="search-results">
<xsl:for-each select="object">
<xsl:variable name="PIDVALUE">
<xsl:choose>
<xsl:when test="@PID">
<xsl:value-of select="@PID"/>
</xsl:when>
<xsl:when test="field[@name='PID' and @snippet='yes']">
<xsl:value-of select="field[@name='PID']/span/text()"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="field[@name='PID']/text()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="splitBySpace">
<xsl:with-param name="PIDVALUE" select="$PIDVALUE"></xsl:with-param>
<xsl:with-param name="str" select="$ALLOWEDNAMESPACES"/>
</xsl:call-template>
</xsl:for-each>
</div>
</table>
</xsl:template>
<xsl:template name="splitBySpace">
<xsl:param name="str"/>
<xsl:param name="PIDVALUE"/>
</a>
</li>
</xsl:if>
</ul>
</div>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<div class="box">
<h2>Your search yielded no results</h2>
<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>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="objects">
<table><div class="search-results">
<xsl:for-each select="object">
<xsl:variable name="PIDVALUE">
<xsl:choose>
<xsl:when test="@PID">
<xsl:value-of select="@PID"/>
</xsl:when>
<xsl:when test="field[@name='PID' and @snippet='yes']">
<xsl:value-of select="field[@name='PID']/span/text()"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="field[@name='PID']/text()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="splitBySpace">
<xsl:with-param name="PIDVALUE" select="$PIDVALUE"></xsl:with-param>
<xsl:with-param name="str" select="$ALLOWEDNAMESPACES"/>
</xsl:call-template>
</xsl:for-each>
</div></table>
</xsl:template>
<xsl:template name="splitBySpace">
<xsl:param name="str"/>
<xsl:param name="PIDVALUE"/>
<xsl:choose>
<xsl:when test="contains($str,' ')">
<xsl:choose>
<xsl:when test="contains($str,' ')">
<!--'DO SOMETHING WITH THE VALUE IN
{substring-before($str,' ')}-->
<xsl:variable name="testString" select="substring-before($str,' ')"/>
<xsl:variable name="testString" select="substring-before($str,' ')"/>
<xsl:if test="starts-with(php:function('strtolower',$PIDVALUE),php:function('strtolower',$testString))">
<xsl:if test="starts-with(php:function('strtolower',$PIDVALUE),php:function('strtolower',$testString))">
<xsl:call-template name="showResult">
<xsl:call-template name="showResult">
<xsl:with-param name="PIDVALUE" select="$PIDVALUE"/>
<xsl:with-param name="PIDVALUE" select="$PIDVALUE"/>
</xsl:call-template>
</xsl:call-template>
</xsl:if>
</xsl:if>
<!--<xsl:value-of select="substring-before($str,' ')"/>-->
<xsl:call-template name="splitBySpace">
<xsl:with-param name="str"
<xsl:call-template name="splitBySpace">
<xsl:with-param name="str"
select="substring-after($str,' ')"/>
<xsl:with-param name="PIDVALUE"
<xsl:with-param name="PIDVALUE"
select="$PIDVALUE"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<!-- <xsl:if test="substring-before($str, ':') = substring-before($PIDVALUE, ':')">
<xsl:call-template name="showResult">
@ -230,27 +197,23 @@
</xsl:call-template>
</xsl:if>-->
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="showResult">
<xsl:param name="PIDVALUE"/>
<xsl:variable name="DCTITLE">
<xsl:value-of select="field[@name='dc.title']/node()"/>
</xsl:variable>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="showResult">
<xsl:param name="PIDVALUE"/>
<xsl:variable name="DCTITLE">
<xsl:value-of select="field[@name='dc.title']/node()"/>
</xsl:variable>
<xsl:variable name="CLEANTITLE">
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $DCTITLE)"/>
<xsl:variable name="CLEANTITLE">
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $DCTITLE)"/>
</xsl:variable>
<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>
<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>
<!--<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/><![CDATA[&pid=]]><xsl:value-of select="$PIDVALUE"/><![CDATA[&collection=object]]>
</xsl:attribute>-->
@ -261,111 +224,99 @@
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"/>/JPG/jpg.jpg&amp;svc_id=info:lanl-repo/svc/getRegion&amp;svc_val_fmt=info:ofi/fmt:kev:mtx:jpeg&amp;svc.format=image/jpeg&amp;svc.level=0&amp;svc.rotate=0&amp;svc.region=0,0,100,100</xsl:attribute>
</img>-->
<img>
<xsl:attribute name="src">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PIDVALUE"/>/TN
</xsl:attribute>
</img>
</a>
<img>
<xsl:attribute name="src"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:copy-of select="$PIDVALUE"/>/TN
</xsl:attribute>
</img>
</a>
</td >
</td >
<td width="80%" valign="top">
<table valign="top">
<td width="80%" valign="top">
<table valign="top">
<tr valign="top">
<td valign="top" class="search-results" colspan="2">
<tr valign="top">
<td valign="top" class="search-results" colspan="2">
<xsl:value-of select="@no"/>
<xsl:value-of select="'. '"/>
<xsl:value-of select="@no"/>
<xsl:value-of select="'. '"/>
<a>
<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>
<xsl:value-of select="$PIDVALUE"/>
<br />
</a>
<span class="searchtitle">
<span >
Score:(
<xsl:value-of select="@score"/>)
</span>
<br />
<a>
<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 />
</a>
<span class="searchtitle">
<span >
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"/>
</a>
</span>
</xsl:attribute>
<xsl:value-of select="field[@name='dc.title']/node()" disable-output-escaping="yes"/>
</a>
</span>
</td>
</td>
</tr>
</tr>
<xsl:for-each select="field[@snippet='yes']">
<xsl:choose>
<xsl:when test="(@name='fgs.DS.first.text')">
<xsl:for-each select="field[@snippet='yes']">
<xsl:choose>
<xsl:when test="(@name='fgs.DS.first.text')">
<tr>
<td valign="top">
<span class="searchtitle">
<tr>
<td valign="top">
<span class="searchtitle">
Text Stream<!--<xsl:value-of select="@name"/>-->
</span>
</td>
<td>
<span class="text">
<xsl:copy-of select="node()"/>
</span>
</td>
</tr>
</xsl:when>
<xsl:when test="(@name='dc.title')">
</xsl:when>
<xsl:otherwise>
<tr>
<td valign="top">
<span class="searchtitle">
<xsl:value-of select="@name"/>
</span>
</td>
<td>
<span class="text">
<xsl:copy-of select="node()"/>
</span>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</table>
</td>
</tr>
</xsl:template>
</span>
</td>
<td>
<span class="text">
<xsl:copy-of select="node()"/>
</span>
</td>
</tr>
</xsl:when>
<xsl:when test="(@name='dc.title')">
</xsl:when>
<xsl:otherwise>
<tr>
<td valign="top">
<span class="searchtitle">
<xsl:value-of select="@name"/>
</span>
</td>
<td>
<span class="text">
<xsl:copy-of select="node()"/>
</span>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</table>
</td></tr>
</xsl:template>
</xsl:stylesheet>

893
xsl/browseIndexToResultPage.xslt

@ -16,7 +16,7 @@
<xsl:param name="RESULTPAGEXSLT" select="resultPageXslt"/>
<xsl:param name="DATETIME" select="none"/>
<xsl:variable name="OBJECTSPAGE" select="$objectsPage"/>
<xsl:variable name="DISPLAYNAME" select="$displayName"/>
<xsl:variable name="DISPLAYNAME" select="$displayName"/>
<xsl:variable name="INDEXNAME" select="lucenebrowseindex/@indexName"/>
<xsl:variable name="FIELDNAME" select="lucenebrowseindex/@fieldName"/>
@ -32,569 +32,352 @@
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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</li>
<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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</li>
<!--End letters-->
<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:attribute> >>
</a>
</li>
</ul>
<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:attribute> >>
</a>
</li>
</ul>
</div>
<!--End pager Div-->
<br />
<br />
<br /><br />
<xsl:apply-templates select="terms"/>
<br />
<!--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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</li>
<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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</li>
<!--End letters-->
<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:attribute> >>
</a>
</li>
</ul>
<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:attribute> >>
</a>
</li>
</ul>
</div>
<!--End pager Div-->
<!--<xsl:copy-of select="fields"/>-->
@ -609,10 +392,8 @@
<xsl:attribute name="href">
<!-- <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: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:attribute>
<xsl:value-of select="."/>
</a>

72
xsl/convertQDC.xsl

@ -1,55 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:variable name="BASEURL">
<xsl:value-of select="$baseUrl"/>
</xsl:variable>
<xsl:variable name="PATH">
<xsl:value-of select="$path"/>
</xsl:variable>
<xsl:template match="/">
<xsl:variable name="BASEURL">
<xsl:value-of select="$baseUrl"/>
</xsl:variable>
<xsl:variable name="PATH">
<xsl:value-of select="$path"/>
</xsl:variable>
<xsl:template match="/">
<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()"/>
<xsl:for-each select="*">
<div>
<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>
</xsl:if>
</xsl:for-each>
<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()"/>
<xsl:for-each select="*">
<div>
<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>
</xsl:if>
</xsl:for-each>
</tbody>
</table>
</div>
</tbody></table></div>
</xsl:template>
</xsl:template>
</xsl:stylesheet>

298
xsl/refworks.xsl

@ -1,216 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:output method="xml" omit-xml-declaration="yes"/>
<!-- refworks xslt -->
<xsl:template match="/">
<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>
</table>
</xsl:if>
<xsl:if test="/reference/t1">
<h2>Titles</h2>
<ul>
<xsl:for-each select="/reference/t1">
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="/reference/t2">
<ul>
<h3>Secondary Titles</h3>
<xsl:for-each select="/reference/t2">
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="/reference/a1">
<h2>Authors</h2>
<ul>
<xsl:for-each select="/reference/a1">
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:template match="/">
<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>
</table>
</xsl:if>
<xsl:if test="/reference/t1">
<h2>Titles</h2>
<ul>
<xsl:for-each select="/reference/t1">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="/reference/t2">
<ul>
<h3>Secondary Titles</h3>
<xsl:for-each select="/reference/t2">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="/reference/a1">
<h2>Authors</h2>
<ul>
<xsl:for-each select="/reference/a1">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="/reference/a2">
<ul>
<h3>Secondary Authors</h3>
<xsl:for-each select="/reference/a2">
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="/reference/k1">
<h2>Keywords</h2>
<ul>
<xsl:for-each select="/reference/k1">
<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>
</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>
</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"/>
</xsl:variable>
<br />
<xsl:if test="/reference/sn">
<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>
</xsl:if>
</xsl:template>
<xsl:if test="/reference/a2">
<ul>
<h3>Secondary Authors</h3>
<xsl:for-each select="/reference/a2">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="/reference/k1">
<h2>Keywords</h2>
<ul>
<xsl:for-each select="/reference/k1">
<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>
</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>
</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"/>
</xsl:variable>
<br />
<xsl:if test="/reference/sn">
<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>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

476
xsl/results.xsl

@ -1,74 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:php="http://php.net/xsl" exclude-result-prefixes="php">
<xsl:variable name="OBJECTSPAGE">
<xsl:value-of select="$objectsPage"/>
</xsl:variable>
<xsl:variable name="ALLOWEDNAMESPACES" select="$allowedPidNameSpaces"/>
<xsl:variable name="OBJECTSPAGE">
<xsl:value-of select="$objectsPage"/>
</xsl:variable>
<xsl:variable name="ALLOWEDNAMESPACES" select="$allowedPidNameSpaces"/>
<!--<xsl:variable name="PATHTOMAKEIMAGE">
<xsl:value-of select="$pathToMakeImage"/>
</xsl:variable>-->
<xsl:template match="gfindObjects">
<xsl:variable name="INDEXNAME" select="@indexName"/>
<xsl:variable name="PREQUERY" select="substring-before(@query,':')"/>
<xsl:variable name="QUERY" select="substring-after(@query,':')"/>
<xsl:variable name="HITPAGESTART" select="@hitPageStart"/>
<xsl:variable name="HITPAGESIZE" select="@hitPageSize"/>
<xsl:variable name="HITTOTAL" select="@hitTotal"/>
<xsl:variable name="SEARCHURL">
<xsl:value-of select="$searchUrl"/>
</xsl:variable>
<xsl:variable name="TOKEN">
<xsl:value-of select="$searchToken"/>
</xsl:variable>
<xsl:variable name="HITPAGEEND">
<xsl:choose>
<xsl:when test="$HITPAGESTART + $HITPAGESIZE - 1 > $HITTOTAL">
<xsl:value-of select="$HITTOTAL"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$HITPAGESTART + $HITPAGESIZE - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:template match="gfindObjects">
<xsl:variable name="INDEXNAME" select="@indexName"/>
<xsl:variable name="PREQUERY" select="substring-before(@query,':')"/>
<xsl:variable name="QUERY" select="substring-after(@query,':')"/>
<xsl:variable name="HITPAGESTART" select="@hitPageStart"/>
<xsl:variable name="HITPAGESIZE" select="@hitPageSize"/>
<xsl:variable name="HITTOTAL" select="@hitTotal"/>
<xsl:variable name="SEARCHURL">
<xsl:value-of select="$searchUrl"/>
</xsl:variable>
<xsl:variable name="TOKEN">
<xsl:value-of select="$searchToken"/>
</xsl:variable>
<xsl:variable name="HITPAGEEND">
<xsl:choose>
<xsl:when test="$HITPAGESTART + $HITPAGESIZE - 1 > $HITTOTAL">
<xsl:value-of select="$HITTOTAL"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$HITPAGESTART + $HITPAGESIZE - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="HITPAGENO" select="ceiling($HITPAGESTART div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGENOLAST" select="ceiling($HITTOTAL div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGESTARTT" select="(($HITPAGENO - 1) * $HITPAGESIZE + 1)"/>
<xsl:choose>
<xsl:when test="$HITTOTAL > 0">
<xsl:variable name="HITPAGENO" select="ceiling($HITPAGESTART div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGENOLAST" select="ceiling($HITTOTAL div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGESTARTT" select="(($HITPAGENO - 1) * $HITPAGESIZE + 1)"/>
<xsl:choose>
<xsl:when test="$HITTOTAL > 0">
Total Hits =
<strong>
<xsl:value-of select="@hitTotal"/>,
</strong>
<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.
<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/>
<br/>
<!--<form action="/drupal-5.1/?q=search/fedora_collections" method="post" id="search-form" class="search-form">-->
<form action="{$SEARCHURL}" method="post" id="search-form" class="search-form">
<form action="{$SEARCHURL}" method="post" id="search-form" class="search-form">
<input type="hidden" maxlength="255" name="keys" id="edit-keys" size="40" value="{$HITPAGESTARTT+$HITPAGESIZE}:{$QUERY}" class="form-text" />
<input type="hidden" maxlength="255" name="keys" id="edit-keys" size="40" value="{$HITPAGESTARTT+$HITPAGESIZE}:{$QUERY}" class="form-text" />
<!--<xsl:if test="$PREQUERY = fgs.DS.first.text" >-->
<input type="hidden" name="type" id="edit-type" value="{$PREQUERY}" />
<input type="hidden" name="type" id="edit-type" value="{$PREQUERY}" />
<!--</xsl:if>-->
<xsl:if test="$HITPAGENO > 1">
<input type="button" name="back" onClick="javascript:history.go(-1)" id="back-button" value="Previous" class="form-submit" />
</xsl:if>
<xsl:if test="$HITPAGENO &lt; $HITPAGENOLAST">
<input type="submit" name="op" id="edit-submit" value="Next" class="form-submit" />
</xsl:if>
<xsl:if test="$HITPAGENO > 1">
<input type="button" name="back" onClick="javascript:history.go(-1)" id="back-button" value="Previous" class="form-submit" />
</xsl:if>
<xsl:if test="$HITPAGENO &lt; $HITPAGENOLAST">
<input type="submit" name="op" id="edit-submit" value="Next" class="form-submit" />
</xsl:if>
<input type="hidden" name="form_token" id="edit-search-form-form-token" value="{$TOKEN}" />
<input type="hidden" name="form_id" id="edit-search-form" value="search_form" />
<input type="hidden" name="form_token" id="edit-search-form-form-token" value="{$TOKEN}" />
<input type="hidden" name="form_id" id="edit-search-form" value="search_form" />
</form>
<style type="text/css">
</form>
<style type="text/css">
span.highlight
{
@ -79,232 +79,238 @@
{
font-weight: bold
}
</style>
<xsl:apply-templates select="objects"/>
</xsl:when>
<xsl:otherwise>
<div class="box">
<h2>Your search yielded no results</h2>
<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>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="objects">
<table>
<div class="search-results">
<xsl:for-each select="object">
<xsl:variable name="PIDVALUE">
<xsl:choose>
<xsl:when test="@PID">
<xsl:value-of select="@PID"/>
</xsl:when>
<xsl:when test="field[@name='PID' and @snippet='yes']">
<xsl:value-of select="field[@name='PID']/span/text()"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="field[@name='PID']/text()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="splitBySpace">
<xsl:with-param name="PIDVALUE" select="$PIDVALUE"></xsl:with-param>
<xsl:with-param name="str" select="$ALLOWEDNAMESPACES"/>
</xsl:call-template>
</xsl:for-each>
</div>
</table>
</style>
<xsl:apply-templates select="objects"/>
</xsl:when>
<xsl:otherwise>
<div class="box">
<h2>Your search yielded no results</h2>
<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>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="objects">
<table>
<div class="search-results">
<xsl:for-each select="object">
<xsl:variable name="PIDVALUE">
<xsl:choose>
<xsl:when test="@PID">
<xsl:value-of select="@PID"/>
</xsl:when>
<xsl:when test="field[@name='PID' and @snippet='yes']">
<xsl:value-of select="field[@name='PID']/span/text()"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="field[@name='PID']/text()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="splitBySpace">
<xsl:with-param name="PIDVALUE" select="$PIDVALUE"></xsl:with-param>
<xsl:with-param name="str" select="$ALLOWEDNAMESPACES"/>
</xsl:call-template>
</xsl:for-each>
</div>
</table>
</xsl:template>
<xsl:template name="splitBySpace">
<xsl:param name="str"/>
<xsl:param name="PIDVALUE"/>
</xsl:template>
<xsl:template name="splitBySpace">
<xsl:param name="str"/>
<xsl:param name="PIDVALUE"/>
<xsl:choose>
<xsl:when test="contains($str,' ')">
<xsl:choose>
<xsl:when test="contains($str,' ')">
<!--'DO SOMETHING WITH THE VALUE IN
{substring-before($str,' ')}-->
<xsl:variable name="testString" select="substring-before($str,' ')"/>
<xsl:variable name="testString" select="substring-before($str,' ')"/>
<xsl:if test="starts-with($PIDVALUE,$testString)">
<xsl:if test="starts-with($PIDVALUE,$testString)">
<xsl:call-template name="showResult">
<xsl:call-template name="showResult">
<xsl:with-param name="PIDVALUE" select="$PIDVALUE"/>
<xsl:with-param name="PIDVALUE" select="$PIDVALUE"/>
</xsl:call-template>
</xsl:call-template>
</xsl:if>
</xsl:if>
<!--<xsl:value-of select="substring-before($str,' ')"/>-->
<xsl:call-template name="splitBySpace">
<xsl:with-param name="str"
<xsl:call-template name="splitBySpace">
<xsl:with-param name="str"
select="substring-after($str,' ')"/>
<xsl:with-param name="PIDVALUE"
<xsl:with-param name="PIDVALUE"
select="$PIDVALUE"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:if test="substring-before($str, ':') = substring-before($PIDVALUE, ':')">
<xsl:call-template name="showResult">
<xsl:with-param name="PIDVALUE" select="$PIDVALUE"/>
</xsl:call-template>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="showResult">
<xsl:param name="PIDVALUE"/>
<xsl:variable name="DCTITLE">
<xsl:value-of select="field[@name='dc.title']/node()"/>
</xsl:variable>
<xsl:variable name="CLEANTITLE">
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $DCTITLE)"/>
</xsl:variable>
<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>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:if test="substring-before($str, ':') = substring-before($PIDVALUE, ':')">
<xsl:call-template name="showResult">
<xsl:with-param name="PIDVALUE" select="$PIDVALUE"/>
</xsl:call-template>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="showResult">
<xsl:param name="PIDVALUE"/>
<xsl:variable name="DCTITLE">
<xsl:value-of select="field[@name='dc.title']/node()"/>
</xsl:variable>
<xsl:variable name="CLEANTITLE">
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $DCTITLE)"/>
</xsl:variable>
<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>
<!--<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>
</img>
</a>
<img>
<xsl:attribute name="src">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PIDVALUE"/>/TN
</xsl:attribute>
</img>
</a>
</td >
</td >
<td width="80%" valign="top">
<table valign="top">
<td width="80%" valign="top">
<table valign="top">
<tr valign="top">
<td valign="top" class="search-results" colspan="2">
<tr valign="top">
<td valign="top" class="search-results" colspan="2">
<xsl:value-of select="@no"/>
<xsl:value-of select="'. '"/>
<xsl:value-of select="@no"/>
<xsl:value-of select="'. '"/>
<a>
<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>
<xsl:value-of select="$PIDVALUE"/>
<br />
</a>
<span class="searchtitle">
<span >
<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 />
</a>
<span class="searchtitle">
<span >
Score:(
<xsl:value-of select="@score"/>)
</span>
<br />
<a>
<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"/>
</a>
</span>
</xsl:attribute>
<xsl:value-of select="field[@name='dc.title']/node()" disable-output-escaping="yes"/>
</a>
</span>
</td>
</td>
</tr>
</tr>
<xsl:for-each select="field[@snippet='yes']">
<xsl:choose>
<xsl:when test="(@name='fgs.DS.first.text')">
<xsl:for-each select="field[@snippet='yes']">
<xsl:choose>
<xsl:when test="(@name='fgs.DS.first.text')">
<tr>
<td valign="top">
<span class="searchtitle">
<tr>
<td valign="top">
<span class="searchtitle">
Text Stream<!--<xsl:value-of select="@name"/>-->
</span>
</td>
<td>
<span class="text">
<xsl:copy-of select="node()"/>
</span>
</td>
</tr>
</xsl:when>
<xsl:when test="(@name='dc.title')">
</xsl:when>
<xsl:otherwise>
<tr>
<td valign="top">
<span class="searchtitle">
<xsl:value-of select="@name"/>
</span>
</td>
<td>
<span class="text">
<xsl:copy-of select="node()"/>
</span>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</table>
</span>
</td>
<td>
<span class="text">
<xsl:copy-of select="node()"/>
</span>
</td>
</tr>
</xsl:when>
<xsl:when test="(@name='dc.title')">
</xsl:when>
<xsl:otherwise>
<tr>
<td valign="top">
<span class="searchtitle">
<xsl:value-of select="@name"/>
</span>
</td>
<td>
<span class="text">
<xsl:copy-of select="node()"/>
</span>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</td>
</tr>
</xsl:template>
</table>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>

101
xsl/romeo.xsl

@ -1,82 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<h2>Conditions</h2>
<ul>
<xsl:for-each select="romeoapi/publishers/publisher/conditions/condition">
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
<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>
<h2>Conditions</h2>
<ul>
<xsl:for-each select="romeoapi/publishers/publisher/conditions/condition">
<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 />
<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>
<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>
</xsl:if>
</xsl:template>
<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>
<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>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

455
xsl/sparql_to_html.xsl

@ -1,104 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" version="1.0" xmlns:php="http://php.net/xsl" exclude-result-prefixes="php">
<!-- Red and White XSLT -->
<xsl:variable name="BASEURL">
<xsl:value-of select="$baseUrl"/>
</xsl:variable>
<xsl:variable name="PATH">
<xsl:value-of select="$path"/>
</xsl:variable>
<xsl:variable name="thisPid" select="$collectionPid"/>
<xsl:variable name="thisTitle" select="$collectionTitle"/>
<xsl:variable name="size" select="20"/>
<xsl:variable name="page" select="$hitPage"/>
<xsl:variable name="start" select="((number($page) - 1) * number($size)) + 1"/>
<xsl:variable name="end" select="($start - 1) + number($size)"/>
<xsl:variable name="cellsPerRow" select="4"/>
<xsl:variable name="count" select="count(s:sparql/s:results/s:result)"/>
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr>
<td colspan="{$cellsPerRow}">
<xsl:variable name="BASEURL">
<xsl:value-of select="$baseUrl"/>
</xsl:variable>
<xsl:variable name="PATH">
<xsl:value-of select="$path"/>
</xsl:variable>
<xsl:variable name="thisPid" select="$collectionPid"/>
<xsl:variable name="thisTitle" select="$collectionTitle"/>
<xsl:variable name="size" select="20"/>
<xsl:variable name="page" select="$hitPage"/>
<xsl:variable name="start" select="((number($page) - 1) * number($size)) + 1"/>
<xsl:variable name="end" select="($start - 1) + number($size)"/>
<xsl:variable name="cellsPerRow" select="4"/>
<xsl:variable name="count" select="count(s:sparql/s:results/s:result)"/>
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<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:when>
<xsl:when test="$end >= $count">
<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:when>
<xsl:when test="$end >= $count">
<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>
<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>
&lt;Prev
</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 />
<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>
</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 />
<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>
Next>
</a>
</li>
</xsl:when>
<xsl:otherwise>
<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>
</a></li>
</xsl:when>
<xsl:otherwise>
<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>
&lt;Prev
</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>
</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>
Next>
</a>
</li>
</xsl:otherwise>
</xsl:choose>
</ul>
</div>
</a></li>
</xsl:otherwise>
</xsl:choose>
</ul>
</div>
<!-- end previous next-->
<br clear="all" />
</td>
</tr>
<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"/>
@ -118,148 +90,109 @@
</tr>
</xsl:for-each>-
-->
<xsl:apply-templates select="s:sparql/s:results"/>
</table>
<br clear="all" />
<xsl:apply-templates select="s:sparql/s:results"/>
</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:when>
<xsl:when test="$end >= $count">
<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:when>
<xsl:when test="$end >= $count">
<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>
<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>
&lt;Prev
</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 />
<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>
</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 />
<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>
Next>
</a>
</li>
</xsl:when>
<xsl:otherwise>
<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>
</a></li>
</xsl:when>
<xsl:otherwise>
<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>
&lt;Prev
</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>
</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>
Next>
</a>
</li>
</xsl:otherwise>
</xsl:choose>
</ul>
</div>
</a></li>
</xsl:otherwise>
</xsl:choose>
</ul>
</div>
<!-- end previous next-->
</xsl:if>
</xsl:template>
<xsl:template match="s:sparql/s:results">
<xsl:for-each select="s:result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]">
<tr>
<xsl:apply-templates select=". | following-sibling::s:result[position() &lt; $cellsPerRow]"/>
</tr>
</xsl:for-each>
</xsl:template>
<xsl:template match="s:result">
<xsl:variable name='OBJECTURI' select="s:object/@uri"/>
<xsl:variable name='CONTENTURI' select="s:content/@uri"/>
<xsl:variable name='CONTENTMODEL' select="substring-after($CONTENTURI,'/')"/>
<xsl:variable name='PID' select="substring-after($OBJECTURI,'/')"/>
<xsl:variable name="newTitle" >
<xsl:call-template name="replace-string">
<xsl:with-param name="text" select="s:title"/>
<xsl:with-param name="from" select="'_'"/>
<xsl:with-param name="to" select="' '"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="cleanTitle">
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $newTitle)"/>
</xsl:variable>
<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:when>
<xsl:otherwise>
</xsl:if>
</xsl:template>
<xsl:template match="s:sparql/s:results">
<xsl:for-each select="s:result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]">
<tr>
<xsl:apply-templates select=". | following-sibling::s:result[position() &lt; $cellsPerRow]"/>
</tr>
</xsl:for-each>
</xsl:template>
<xsl:template match="s:result">
<xsl:variable name='OBJECTURI' select="s:object/@uri"/>
<xsl:variable name='CONTENTURI' select="s:content/@uri"/>
<xsl:variable name='CONTENTMODEL' select="substring-after($CONTENTURI,'/')"/>
<xsl:variable name='PID' select="substring-after($OBJECTURI,'/')"/>
<xsl:variable name="newTitle" >
<xsl:call-template name="replace-string">
<xsl:with-param name="text" select="s:title"/>
<xsl:with-param name="from" select="'_'"/>
<xsl:with-param name="to" select="' '"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="cleanTitle">
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $newTitle)"/>
</xsl:variable>
<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: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: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>
<img>
<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>
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<xsl:value-of select="$newTitle" disable-output-escaping="yes" />
</a>
<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>
<img>
<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>
</img> </a> <br clear="all" />
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<xsl:value-of select="$newTitle" disable-output-escaping="yes" />
</a>
<!-- example of a url that would drill down to the details page if the url above went directly to a datastream
<xsl:if test="($CONTENTMODEL!='islandora:collectionCModel')">
<br />[[ <a>
@ -270,45 +203,45 @@
</a> ]]
</xsl:if>-->
</td>
<xsl:if test="(position() = last()) and (position() &lt; $cellsPerRow)">
<xsl:call-template name="FillerCells">
<xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="FillerCells">
<xsl:param name="cellCount"/>
<td>&#160;</td>
<xsl:if test="$cellCount > 1">
<xsl:call-template name="FillerCells">
<xsl:with-param name="cellCount" select="$cellCount - 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="replace-string">
<xsl:param name="text"/>
<xsl:param name="from"/>
<xsl:param name="to"/>
</td>
<xsl:if test="(position() = last()) and (position() &lt; $cellsPerRow)">
<xsl:call-template name="FillerCells">
<xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="FillerCells">
<xsl:param name="cellCount"/>
<td>&#160;</td>
<xsl:if test="$cellCount > 1">
<xsl:call-template name="FillerCells">
<xsl:with-param name="cellCount" select="$cellCount - 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="replace-string">
<xsl:param name="text"/>
<xsl:param name="from"/>
<xsl:param name="to"/>
<xsl:choose>
<xsl:when test="contains($text, $from)">
<xsl:choose>
<xsl:when test="contains($text, $from)">
<xsl:variable name="before" select="substring-before($text, $from)"/>
<xsl:variable name="after" select="substring-after($text, $from)"/>
<xsl:variable name="prefix" select="concat($before, $to)"/>
<xsl:variable name="before" select="substring-before($text, $from)"/>
<xsl:variable name="after" select="substring-after($text, $from)"/>
<xsl:variable name="prefix" select="concat($before, $to)"/>
<xsl:value-of select="$before"/>
<xsl:value-of select="$to"/>
<xsl:call-template name="replace-string">
<xsl:with-param name="text" select="$after"/>
<xsl:with-param name="from" select="$from"/>
<xsl:with-param name="to" select="$to"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:value-of select="$before"/>
<xsl:value-of select="$to"/>
<xsl:call-template name="replace-string">
<xsl:with-param name="text" select="$after"/>
<xsl:with-param name="from" select="$from"/>
<xsl:with-param name="to" select="$to"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

177
xsl/specdwc.xsl

@ -4,157 +4,40 @@
xmlns:dc="http://purl.org/dc/terms/"
xmlns:dwr="http://rs.tdwg.org/dwc/xsd/simpledarwincore/"
xmlns:dwc="http://rs.tdwg.org/dwc/terms/">
<xs:import namespace="http://rs.tdwg.org/dwc/terms/" schemaLocation="tdwg_dwcterms.xsd"/>
<xs:import namespace="http://rs.tdwg.org/dwc/terms/" schemaLocation="tdwg_dwcterms.xsd"/>
<xs:import namespace="http://purl.org/dc/terms/" schemaLocation="dublin_core.xsd"/>
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:output method="xml" omit-xml-declaration="yes"/>
<!-- SPECIMEN XSLT -->
<xsl:template match="/">
<xsl:template match="/">
<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>
<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>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>
</table>
</xsl:template>
<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>

416
xsl/unfilteredresults.xsl

@ -1,70 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:php="http://php.net/xsl" exclude-result-prefixes="php">
<xsl:variable name="OBJECTSPAGE">
<xsl:value-of select="$objectsPage"/>
</xsl:variable>
<xsl:variable name="OBJECTSPAGE">
<xsl:value-of select="$objectsPage"/>
</xsl:variable>
<xsl:template match="gfindObjects">
<xsl:variable name="INDEXNAME" select="@indexName"/>
<xsl:variable name="PREQUERY" select="substring-before(@query,':')"/>
<xsl:variable name="QUERY" select="substring-after(@query,':')"/>
<xsl:variable name="HITPAGESTART" select="@hitPageStart"/>
<xsl:variable name="HITPAGESIZE" select="@hitPageSize"/>
<xsl:variable name="HITTOTAL" select="@hitTotal"/>
<xsl:variable name="SEARCHURL">
<xsl:value-of select="$searchUrl"/>
</xsl:variable>
<xsl:variable name="TOKEN">
<xsl:value-of select="$searchToken"/>
</xsl:variable>
<xsl:variable name="HITPAGEEND">
<xsl:choose>
<xsl:when test="$HITPAGESTART + $HITPAGESIZE - 1 > $HITTOTAL">
<xsl:value-of select="$HITTOTAL"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$HITPAGESTART + $HITPAGESIZE - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:template match="gfindObjects">
<xsl:variable name="INDEXNAME" select="@indexName"/>
<xsl:variable name="HITPAGENO" select="ceiling($HITPAGESTART div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGENOLAST" select="ceiling($HITTOTAL div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGESTARTT" select="(($HITPAGENO - 1) * $HITPAGESIZE + 1)"/>
<xsl:choose>
<xsl:when test="$HITTOTAL > 0">
<xsl:variable name="PREQUERY" select="substring-before(@query,':')"/>
<xsl:variable name="QUERY" select="substring-after(@query,':')"/>
<xsl:variable name="HITPAGESTART" select="@hitPageStart"/>
<xsl:variable name="HITPAGESIZE" select="@hitPageSize"/>
<xsl:variable name="HITTOTAL" select="@hitTotal"/>
<xsl:variable name="SEARCHURL">
<xsl:value-of select="$searchUrl"/>
</xsl:variable>
<xsl:variable name="TOKEN">
<xsl:value-of select="$searchToken"/>
</xsl:variable>
<xsl:variable name="HITPAGEEND">
<xsl:choose>
<xsl:when test="$HITPAGESTART + $HITPAGESIZE - 1 > $HITTOTAL">
<xsl:value-of select="$HITTOTAL"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$HITPAGESTART + $HITPAGESIZE - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="HITPAGENO" select="ceiling($HITPAGESTART div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGENOLAST" select="ceiling($HITTOTAL div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGESTARTT" select="(($HITPAGENO - 1) * $HITPAGESIZE + 1)"/>
<xsl:choose>
<xsl:when test="$HITTOTAL > 0">
Total Hits =
<strong>
<xsl:value-of select="@hitTotal"/>,
</strong>
<strong>
<xsl:value-of select="@hitTotal"/>,
</strong>
Number of Hits/page =
<xsl:value-of select="@hitPageSize"/>
<xsl:value-of select="@hitPageSize"/>
<!-- Current page = <xsl:value-of select="@hitPageStart"/>-->
<br/>
<br/>
<!--<form action="/drupal-5.1/?q=search/fedora_collections" method="post" id="search-form" class="search-form">-->
<form action="{$SEARCHURL}" method="post" id="search-form" class="search-form">
<form action="{$SEARCHURL}" method="post" id="search-form" class="search-form">
<input type="hidden" maxlength="255" name="keys" id="edit-keys" size="40" value="{$HITPAGESTARTT+$HITPAGESIZE}:{$QUERY}" class="form-text" />
<input type="hidden" maxlength="255" name="keys" id="edit-keys" size="40" value="{$HITPAGESTARTT+$HITPAGESIZE}:{$QUERY}" class="form-text" />
<!--<xsl:if test="$PREQUERY = fgs.DS.first.text" >-->
<input type="hidden" name="type" id="edit-type" value="{$PREQUERY}" />
<input type="hidden" name="type" id="edit-type" value="{$PREQUERY}" />
<!--</xsl:if>-->
<xsl:if test="$HITPAGENO > 1">
<input type="button" name="back" onClick="javascript:history.go(-1)" id="back-button" value="Previous" class="form-submit" />
</xsl:if>
<xsl:if test="$HITPAGENO &lt; $HITPAGENOLAST">
<input type="submit" name="op" id="edit-submit" value="Next" class="form-submit" />
</xsl:if>
<xsl:if test="$HITPAGENO > 1">
<input type="button" name="back" onClick="javascript:history.go(-1)" id="back-button" value="Previous" class="form-submit" />
</xsl:if>
<xsl:if test="$HITPAGENO &lt; $HITPAGENOLAST">
<input type="submit" name="op" id="edit-submit" value="Next" class="form-submit" />
</xsl:if>
<input type="hidden" name="form_token" id="edit-search-form-form-token" value="{$TOKEN}" />
<input type="hidden" name="form_id" id="edit-search-form" value="search_form" />
<input type="hidden" name="form_token" id="edit-search-form-form-token" value="{$TOKEN}" />
<input type="hidden" name="form_id" id="edit-search-form" value="search_form" />
</form>
<style type="text/css">
</form>
<style type="text/css">
span.highlight
{
@ -75,195 +75,195 @@
{
font-weight: bold
}
</style>
<xsl:apply-templates select="objects"/>
</xsl:when>
<xsl:otherwise>
<div class="box">
<h2>Your search yielded no results</h2>
<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>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="objects">
<table>
<div class="search-results">
<xsl:for-each select="object">
<xsl:variable name="PIDVALUE">
<xsl:choose>
<xsl:when test="@PID">
<xsl:value-of select="@PID"/>
</xsl:when>
<xsl:when test="field[@name='PID' and @snippet='yes']">
<xsl:value-of select="field[@name='PID']/span/text()"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="field[@name='PID']/text()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="showResult">
<xsl:with-param name="PIDVALUE" select="$PIDVALUE"/>
</xsl:call-template>
</xsl:for-each>
</div>
</table>
</style>
<xsl:apply-templates select="objects"/>
</xsl:when>
<xsl:otherwise>
<div class="box">
</xsl:template>
<h2>Your search yielded no results</h2>
<div class="content">
<ul>
<li>Check if your spelling is correct.</li>
<xsl:template name="showResult">
<xsl:param name="PIDVALUE"/>
<xsl:variable name="DCTITLE">
<xsl:value-of select="field[@name='dc.title']/node()"/>
</xsl:variable>
<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>
<xsl:variable name="CLEANTITLE">
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $DCTITLE)"/>
</xsl:variable>
<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>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="objects">
<table>
<div class="search-results">
<xsl:for-each select="object">
<xsl:variable name="PIDVALUE">
<xsl:choose>
<xsl:when test="@PID">
<xsl:value-of select="@PID"/>
</xsl:when>
<xsl:when test="field[@name='PID' and @snippet='yes']">
<xsl:value-of select="field[@name='PID']/span/text()"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="field[@name='PID']/text()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="showResult">
<xsl:with-param name="PIDVALUE" select="$PIDVALUE"/>
</xsl:call-template>
</xsl:for-each>
</div>
</table>
</xsl:template>
<xsl:template name="showResult">
<xsl:param name="PIDVALUE"/>
<xsl:variable name="DCTITLE">
<xsl:value-of select="field[@name='dc.title']/node()"/>
</xsl:variable>
<xsl:variable name="CLEANTITLE">
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $DCTITLE)"/>
</xsl:variable>
<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>
<!--<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>
</img>
</a>
<img>
<xsl:attribute name="src">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PIDVALUE"/>/TN
</xsl:attribute>
</img>
</a>
</td >
</td >
<td width="80%" valign="top">
<table valign="top">
<td width="80%" valign="top">
<table valign="top">
<tr valign="top">
<td valign="top" class="search-results" colspan="2">
<tr valign="top">
<td valign="top" class="search-results" colspan="2">
<xsl:value-of select="@no"/>
<xsl:value-of select="'. '"/>
<xsl:value-of select="@no"/>
<xsl:value-of select="'. '"/>
<a>
<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>
<xsl:value-of select="$PIDVALUE"/>
<br />
</a>
<span class="searchtitle">
<span >
<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 />
</a>
<span class="searchtitle">
<span >
Score:(
<xsl:value-of select="@score"/>)
</span>
<br />
<a>
<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"/>
</a>
</span>
</xsl:attribute>
<xsl:value-of select="field[@name='dc.title']/node()" disable-output-escaping="yes"/>
</a>
</span>
</td>
</td>
</tr>
</tr>
<xsl:for-each select="field[@snippet='yes']">
<xsl:choose>
<xsl:when test="(@name='fgs.DS.first.text')">
<xsl:for-each select="field[@snippet='yes']">
<xsl:choose>
<xsl:when test="(@name='fgs.DS.first.text')">
<tr>
<td valign="top">
<span class="searchtitle">
<tr>
<td valign="top">
<span class="searchtitle">
Text Stream<!--<xsl:value-of select="@name"/>-->
</span>
</td>
<td>
<span class="text">
<xsl:copy-of select="node()"/>
</span>
</td>
</tr>
</xsl:when>
<xsl:when test="(@name='dc.title')">
</xsl:when>
<xsl:otherwise>
<tr>
<td valign="top">
<span class="searchtitle">
<xsl:value-of select="@name"/>
</span>
</td>
<td>
<span class="text">
<xsl:copy-of select="node()"/>
</span>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</table>
</span>
</td>
<td>
<span class="text">
<xsl:copy-of select="node()"/>
</span>
</td>
</tr>
</xsl:when>
<xsl:when test="(@name='dc.title')">
</xsl:when>
<xsl:otherwise>
<tr>
<td valign="top">
<span class="searchtitle">
<xsl:value-of select="@name"/>
</span>
</td>
<td>
<span class="text">
<xsl:copy-of select="node()"/>
</span>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</td>
</tr>
</xsl:template>
</table>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>

Loading…
Cancel
Save