Changeset 22210

Show
Ignore:
Timestamp:
01.06.2010 15:01:11 (9 years ago)
Author:
kjdon
Message:

removed the eprints specific stuff; a few changes to make the display nicer, eg added in set description display; added code for nicely displaying qualified dublin core metadata

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/web/style/oai2.xsl

    r19113 r22210  
    2828 
    2929--> 
    30  
    3130    
    3231<!-- 
     
    4544 
    4645--> 
     46 
     47<!-- Modified for the Greenstone OAI server  
     48 
     49  * Rules for Qualified Dublin Core added (gsdl_qdc) 
     50  * EPrints specific stuff removed 
     51--> 
     52 
     53 
    4754<xsl:stylesheet 
    4855    version="1.0" 
     
    166173    <xsl:call-template name="quicklinks"/> 
    167174    <h2><a name="moreinfo">About the XSLT</a></h2> 
    168     <p>An XSLT file has converted the <a href="http://www.openarchives.org">OAI-PMH 2.0</a> responses into XHTML which looks nice in a browser which supports XSLT such as Mozilla, Firebird and Internet Explorer. The XSLT file was created by <a href="http://www.ecs.soton.ac.uk/people/cjg">Christopher Gutteridge</a> at the University of Southampton as part of the <a href="http://software.eprints.org">GNU EPrints system</a>, and is freely redistributable under the <a href="http://www.gnu.org">GPL</a>.</p><p>If you want to use the XSL file on your own OAI interface you may but due to the way XSLT works you must install the XSL file on the same server as the OAI script, you can't just link to this copy.</p><p>For more information or to download the XSL file please see the <a href="http://software.eprints.org/xslt.php">OAI to XHTML XSLT homepage</a>.</p> 
     175    <p>An XSLT file has converted the <a href="http://www.openarchives.org">OAI-PMH 2.0</a> responses into XHTML which looks nice in a browser which supports XSLT such as Mozilla, Firebird and Internet Explorer. The XSLT file was created by <a href="http://www.ecs.soton.ac.uk/people/cjg">Christopher Gutteridge</a> at the University of Southampton as part of the <a href="http://software.eprints.org">GNU EPrints system</a>, and modified by the NZDL Project for use with the Greenstone OAI server. It is freely redistributable under the <a href="http://www.gnu.org">GPL</a>.</p><p>If you want to use the XSL file on your own OAI interface you may but due to the way XSLT works you must install the XSL file on the same server as the OAI script, you can't just link to this copy.</p><p>For more information or to download the XSL file please see the <a href="http://software.eprints.org/xslt.php">OAI to XHTML XSLT homepage</a>.</p> 
    169176 
    170177  </body> 
     
    175182    <ul class="quicklinks"> 
    176183      <li><a href="?verb=Identify">Identify</a> | </li>  
    177       <li><a href="?verb=ListRecords&amp;metadataPrefix=oai_dc">ListRecords</a> | </li> 
     184      <li><a href="?verb=ListRecords&amp;metadataPrefix=oai_dc">ListRecords (oai_dc)</a> | </li> 
    178185      <li><a href="?verb=ListSets">ListSets</a> | </li> 
    179186      <li><a href="?verb=ListMetadataFormats">ListMetadataFormats</a> | </li> 
    180       <li><a href="?verb=ListIdentifiers&amp;metadataPrefix=oai_dc">ListIdentifiers</a></li> 
     187      <li><a href="?verb=ListIdentifiers&amp;metadataPrefix=oai_dc">ListIdentifiers (oai_dc)</a></li> 
    181188    </ul> 
    182189</xsl:template> 
     
    283290 
    284291 
    285 <!-- 
    286    Identify / EPrints 
    287 --> 
    288  
    289 <xsl:template match="ep:eprints" xmlns:ep="http://www.openarchives.org/OAI/1.1/eprints"> 
    290   <h2>EPrints Description</h2> 
    291   <h3>Content</h3> 
    292   <xsl:apply-templates select="ep:content"/> 
    293   <xsl:if test="ep:submissionPolicy"> 
    294     <h3>Submission Policy</h3> 
    295     <xsl:apply-templates select="ep:submissionPolicy"/> 
    296   </xsl:if> 
    297   <h3>Metadata Policy</h3> 
    298   <xsl:apply-templates select="ep:metadataPolicy"/> 
    299   <h3>Data Policy</h3> 
    300   <xsl:apply-templates select="ep:dataPolicy"/> 
    301   <xsl:if test="ep:content"> 
    302     <h3>Content</h3> 
    303     <xsl:apply-templates select="ep:content"/> 
    304   </xsl:if> 
    305   <xsl:apply-templates select="ep:comment"/> 
    306 </xsl:template> 
    307  
    308 <xsl:template match="ep:content|ep:dataPolicy|ep:metadataPolicy|ep:submissionPolicy" xmlns:ep="http://www.openarchives.org/OAI/1.1/eprints"> 
    309   <xsl:if test="ep:text"> 
    310     <p><xsl:value-of select="ep:text" /></p> 
    311   </xsl:if> 
    312   <xsl:if test="ep:URL"> 
    313     <div><a href="{ep:URL}"><xsl:value-of select="ep:URL" /></a></div> 
    314   </xsl:if> 
    315 </xsl:template> 
    316  
    317 <xsl:template match="ep:comment" xmlns:ep="http://www.openarchives.org/OAI/1.1/eprints"> 
    318   <h3>Comment</h3> 
    319   <div><xsl:value-of select="."/></div> 
    320 </xsl:template> 
    321  
    322  
    323 <!-- 
    324    Identify / Friends 
    325 --> 
    326  
    327 <xsl:template match="fr:friends" xmlns:fr="http://www.openarchives.org/OAI/2.0/friends/"> 
    328   <h2>Friends</h2> 
    329   <ul> 
    330     <xsl:apply-templates select="fr:baseURL"/> 
    331   </ul> 
    332 </xsl:template> 
    333  
    334 <xsl:template match="fr:baseURL" xmlns:fr="http://www.openarchives.org/OAI/2.0/friends/"> 
    335   <li><xsl:value-of select="."/>  
    336 <xsl:text> </xsl:text> 
    337 <a class="link" href="{.}?verb=Identify">Identify</a></li> 
    338 </xsl:template> 
    339  
    340  
    341 <!-- 
    342    Identify / Branding 
    343 --> 
    344  
    345 <xsl:template match="br:branding" xmlns:br="http://www.openarchives.org/OAI/2.0/branding/"> 
    346   <h2>Branding</h2> 
    347   <xsl:apply-templates select="br:collectionIcon"/> 
    348   <xsl:apply-templates select="br:metadataRendering"/> 
    349 </xsl:template> 
    350  
    351 <xsl:template match="br:collectionIcon" xmlns:br="http://www.openarchives.org/OAI/2.0/branding/"> 
    352   <h3>Icon</h3> 
    353   <xsl:choose> 
    354     <xsl:when test="link!=''"> 
    355       <a href="{br:link}"><img src="{br:url}" alt="{br:title}" width="{br:width}" height="{br:height}" border="0" /></a> 
    356     </xsl:when> 
    357     <xsl:otherwise> 
    358       <img src="{br:url}" alt="{br:title}" width="{br:width}" height="{br:height}" border="0" /> 
    359     </xsl:otherwise> 
    360   </xsl:choose> 
    361 </xsl:template> 
    362  
    363 <xsl:template match="br:metadataRendering" xmlns:br="http://www.openarchives.org/OAI/2.0/branding/"> 
    364   <h3>Metadata Rendering Rule</h3> 
    365   <table class="values"> 
    366     <tr><td class="key">URL</td> 
    367     <td class="value"><xsl:value-of select="."/></td></tr> 
    368     <tr><td class="key">Namespace</td> 
    369     <td class="value"><xsl:value-of select="@metadataNamespace"/></td></tr> 
    370     <tr><td class="key">Mime Type</td> 
    371     <td class="value"><xsl:value-of select="@mimetype"/></td></tr> 
    372   </table> 
    373 </xsl:template> 
    374  
    375  
    376  
    377 <!-- 
    378    Identify / Gateway 
    379 --> 
    380  
    381 <xsl:template match="gw:gateway" xmlns:gw="http://www.openarchives.org/OAI/2.0/gateway/x"> 
    382   <h2>Gateway Information</h2> 
    383   <table class="values"> 
    384     <tr><td class="key">Source</td> 
    385     <td class="value"><xsl:value-of select="gw:source"/></td></tr> 
    386     <tr><td class="key">Description</td> 
    387     <td class="value"><xsl:value-of select="gw:gatewayDescription"/></td></tr> 
    388     <xsl:apply-templates select="gw:gatewayAdmin"/> 
    389     <xsl:if test="gw:gatewayURL"> 
    390       <tr><td class="key">URL</td> 
    391       <td class="value"><xsl:value-of select="gw:gatewayURL"/></td></tr> 
    392     </xsl:if> 
    393     <xsl:if test="gw:gatewayNotes"> 
    394       <tr><td class="key">Notes</td> 
    395       <td class="value"><xsl:value-of select="gw:gatewayNotes"/></td></tr> 
    396     </xsl:if> 
    397   </table> 
    398 </xsl:template> 
    399  
    400 <xsl:template match="gw:gatewayAdmin" xmlns:gw="http://www.openarchives.org/OAI/2.0/gateway/"> 
    401   <tr><td class="key">Admin</td> 
    402   <td class="value"><xsl:value-of select="."/></td></tr> 
    403 </xsl:template> 
    404  
    405  
    406292<!-- GetRecord --> 
    407293 
     
    436322    <tr><td class="key">setName</td> 
    437323    <td class="value"><xsl:value-of select="oai:setName"/></td></tr> 
     324    <tr><td class="key">setDescription</td> 
     325    <td class="value"><xsl:value-of select="oai:setDescription"/></td></tr> 
    438326    <xsl:apply-templates select="oai:setSpec" /> 
    439327  </table> 
     
    620508<tr><td class="key">Rights Management</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
    621509 
     510<!-- gsdl_qdc record --> 
     511<xsl:template match="gsdl_qdc:gsdl_qdc"  xmlns:gsdl_qdc="http://greenstone.org/namespace/gsdl_qdc/1.0/" > 
     512  <div class="dcdata"> 
     513    <h3>Qualified Dublin Core Metadata (gsdl_qdc)</h3> 
     514    <table class="dcdata"> 
     515      <xsl:apply-templates select="*" /> 
     516    </table> 
     517  </div> 
     518</xsl:template> 
     519 
     520<xsl:template match="dc:title" xmlns:dc="http://purl.org/dc/terms/"> 
     521<tr><td class="key">Title</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     522<xsl:template match="dc:creator" xmlns:dc="http://purl.org/dc/terms/"> 
     523<tr><td class="key">Creator</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     524<xsl:template match="dc:subject" xmlns:dc="http://purl.org/dc/terms/"> 
     525<tr><td class="key">Subject</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     526<xsl:template match="dc:description" xmlns:dc="http://purl.org/dc/terms/"> 
     527<tr><td class="key">Description</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     528<xsl:template match="dc:publisher" xmlns:dc="http://purl.org/dc/terms/"> 
     529<tr><td class="key">Publisher</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     530<xsl:template match="dc:contributor" xmlns:dc="http://purl.org/dc/terms/"> 
     531<tr><td class="key">Contributor</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     532<xsl:template match="dc:date" xmlns:dc="http://purl.org/dc/terms/"> 
     533<tr><td class="key">Date</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     534<xsl:template match="dc:type" xmlns:dc="http://purl.org/dc/terms/"> 
     535<tr><td class="key">Type</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     536<xsl:template match="dc:format" xmlns:dc="http://purl.org/dc/terms/"> 
     537<tr><td class="key">Format</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     538<xsl:template match="dc:identifier" xmlns:dc="http://purl.org/dc/terms/"> 
     539<tr><td class="key">Identifier</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     540<xsl:template match="dc:source" xmlns:dc="http://purl.org/dc/terms/"> 
     541<tr><td class="key">Source</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     542<xsl:template match="dc:language" xmlns:dc="http://purl.org/dc/terms/"> 
     543<tr><td class="key">Language</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     544<xsl:template match="dc:relation" xmlns:dc="http://purl.org/dc/terms/"> 
     545<tr><td class="key">Relation</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     546<xsl:template match="dc:coverage" xmlns:dc="http://purl.org/dc/terms/"> 
     547<tr><td class="key">Coverage</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     548<xsl:template match="dc:rights" xmlns:dc="http://purl.org/dc/terms/"> 
     549<tr><td class="key">Rights</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     550<xsl:template match="dc:alternative" xmlns:dc="http://purl.org/dc/terms/"> 
     551<tr><td class="key">Alternative Title</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     552<xsl:template match="dc:tableOfContents" xmlns:dc="http://purl.org/dc/terms/"> 
     553<tr><td class="key">Table Of Contents</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     554<xsl:template match="dc:abstract" xmlns:dc="http://purl.org/dc/terms/"> 
     555<tr><td class="key">Abstract</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     556<xsl:template match="dc:created" xmlns:dc="http://purl.org/dc/terms/"> 
     557<tr><td class="key">Date Created</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     558<xsl:template match="dc:valid" xmlns:dc="http://purl.org/dc/terms/"> 
     559<tr><td class="key">Date Valid</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     560<xsl:template match="dc:available" xmlns:dc="http://purl.org/dc/terms/"> 
     561<tr><td class="key">Date Available</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     562<xsl:template match="dc:issued" xmlns:dc="http://purl.org/dc/terms/"> 
     563<tr><td class="key">Date Issued</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     564<xsl:template match="dc:modified" xmlns:dc="http://purl.org/dc/terms/"> 
     565<tr><td class="key">Date Modified</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     566<xsl:template match="dc:dateAccepted" xmlns:dc="http://purl.org/dc/terms/"> 
     567<tr><td class="key">Date Accepted</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     568<xsl:template match="dc:dateCopyrighted" xmlns:dc="http://purl.org/dc/terms/"> 
     569<tr><td class="key">Date Copyrighted</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     570<xsl:template match="dc:dateSubmitted" xmlns:dc="http://purl.org/dc/terms/"> 
     571<tr><td class="key">Date Submitted</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     572<xsl:template match="dc:extent" xmlns:dc="http://purl.org/dc/terms/"> 
     573<tr><td class="key">Extent</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     574<xsl:template match="dc:medium" xmlns:dc="http://purl.org/dc/terms/"> 
     575<tr><td class="key">Medium</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     576<xsl:template match="dc:isVersionOf" xmlns:dc="http://purl.org/dc/terms/"> 
     577<tr><td class="key">Is Version Of</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     578<xsl:template match="dc:hasVersion" xmlns:dc="http://purl.org/dc/terms/"> 
     579<tr><td class="key">Has Version</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     580<xsl:template match="dc:isReplacedBy" xmlns:dc="http://purl.org/dc/terms/"> 
     581<tr><td class="key">Is Replaced By</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     582<xsl:template match="dc:replaces" xmlns:dc="http://purl.org/dc/terms/"> 
     583<tr><td class="key">Replaces</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     584<xsl:template match="dc:isRequiredBy" xmlns:dc="http://purl.org/dc/terms/"> 
     585<tr><td class="key">Is Required By</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     586<xsl:template match="dc:requires" xmlns:dc="http://purl.org/dc/terms/"> 
     587<tr><td class="key">Requires</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     588<xsl:template match="dc:isPartOf" xmlns:dc="http://purl.org/dc/terms/"> 
     589<tr><td class="key">Is Part Of</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     590<xsl:template match="dc:hasPart" xmlns:dc="http://purl.org/dc/terms/"> 
     591<tr><td class="key">Has Part</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     592<xsl:template match="dc:isReferencedBy" xmlns:dc="http://purl.org/dc/terms/"> 
     593<tr><td class="key">Is Referenced By</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     594<xsl:template match="dc:references" xmlns:dc="http://purl.org/dc/terms/"> 
     595<tr><td class="key">References</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     596<xsl:template match="dc:isFormatOf" xmlns:dc="http://purl.org/dc/terms/"> 
     597<tr><td class="key">Is Format Of</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     598<xsl:template match="dc:hasFormat" xmlns:dc="http://purl.org/dc/terms/"> 
     599<tr><td class="key">Has Format</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     600<xsl:template match="dc:conformsTo" xmlns:dc="http://purl.org/dc/terms/"> 
     601<tr><td class="key">Conforms To</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     602<xsl:template match="dc:spatial" xmlns:dc="http://purl.org/dc/terms/"> 
     603<tr><td class="key">Spatial Coverage</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     604<xsl:template match="dc:temporal" xmlns:dc="http://purl.org/dc/terms/"> 
     605<tr><td class="key">Temporal Coverage</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     606<xsl:template match="dc:audience" xmlns:dc="http://purl.org/dc/terms/"> 
     607<tr><td class="key">Audience</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     608<xsl:template match="dc:accrualMethod" xmlns:dc="http://purl.org/dc/terms/"> 
     609<tr><td class="key">Accrual Method</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     610<xsl:template match="dc:accrualPeriodicity" xmlns:dc="http://purl.org/dc/terms/"> 
     611<tr><td class="key">Accrual Periodicity</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     612<xsl:template match="dc:accrualPolicy" xmlns:dc="http://purl.org/dc/terms/"> 
     613<tr><td class="key">Accrual Policy</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     614<xsl:template match="dc:instructionalMethod" xmlns:dc="http://purl.org/dc/terms/"> 
     615<tr><td class="key">Instructional Method</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     616<xsl:template match="dc:provenance" xmlns:dc="http://purl.org/dc/terms/"> 
     617<tr><td class="key">Provenance</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     618<xsl:template match="dc:rightsHolder" xmlns:dc="http://purl.org/dc/terms/"> 
     619<tr><td class="key">Rights Holder</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     620<xsl:template match="dc:mediator" xmlns:dc="http://purl.org/dc/terms/"> 
     621<tr><td class="key">Mediator</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     622<xsl:template match="dc:educationLevel" xmlns:dc="http://purl.org/dc/terms/"> 
     623<tr><td class="key">Audience Education Level</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     624<xsl:template match="dc:accessRights" xmlns:dc="http://purl.org/dc/terms/"> 
     625<tr><td class="key">Access Rights</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     626<xsl:template match="dc:license" xmlns:dc="http://purl.org/dc/terms/"> 
     627<tr><td class="key">License</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     628<xsl:template match="dc:bibliographicCitation" xmlns:dc="http://purl.org/dc/terms/"> 
     629<tr><td class="key">Bibliographic Citation</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> 
     630 
    622631<!-- XML Pretty Maker --> 
    623632