Mercurial > hg > eSciDocMPIWGServicesRestlet
view src/de/mpiwg/itgroup/escidoc/MPIWGServices/Restlet/staticPages/searchResult.xsl @ 0:1aac45997235
first ingest
author | dwinter |
---|---|
date | Wed, 01 Dec 2010 17:35:51 +0100 |
parents | |
children | ffeb8be0bded |
line wrap: on
line source
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:srw="http://www.loc.gov/zing/srw/" xmlns:search-result="http://www.escidoc.de/schemas/searchresult/0.8" xmlns:escidocComponents="http://www.escidoc.de/schemas/components/0.9" xmlns:escidocContentStreams="http://www.escidoc.de/schemas/contentstreams/0.7" xmlns:escidocItem="http://www.escidoc.de/schemas/item/0.9" xmlns:escidocMetadataRecords="http://www.escidoc.de/schemas/metadatarecords/0.5" xmlns:prop="http://escidoc.de/core/01/properties/" xmlns:relations="http://www.escidoc.de/schemas/relations/0.3" xmlns:release="http://escidoc.de/core/01/properties/release/" xmlns:srel="http://escidoc.de/core/01/structural-relations/" xmlns:version="http://escidoc.de/core/01/properties/version/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:container="http://www.escidoc.de/schemas/container/0.8" > <xsl:template match="/"> <html> <head> <link rel="stylesheet" type="text/css" href="resultOverview.css"/> </head><body> <xsl:apply-templates select="//search-result:search-result-record"/> </body></html> </xsl:template> <xsl:template match="search-result:search-result-record"> <div class="searchResultRecord"> <div class="result escidocId"> <xsl:value-of select=".//prop:latest-version/@objid"/> </div> <xsl:apply-templates select=".//srel:context"/> <xsl:apply-templates select=".//search-result:text-fragment-data"/> <xsl:apply-templates select="(escidocItem:item[escidocItem:properties/srel:content-model[@objid='escidoc:11003']]) | (container:container)" mode="content"/> <xsl:apply-templates select="(escidocItem:item[escidocItem:properties/srel:content-model[@objid='escidoc:13001']]) | (container:container)" mode="content"/> </div> </xsl:template> <xsl:template match="escidocItem:item" mode="content"> <div class="result displayType">Item</div> <xsl:apply-templates select=".//dc-md" mode="dc"/> <div class="result showEntry"><a><xsl:attribute name="href"><xsl:value-of select=".//escidocComponents:component[escidocComponents:properties/prop:content-category[text()='web_page']]/escidocComponents:content/@xlink:href"/> </xsl:attribute>web</a></div> <div class="result showEntry"> <a><xsl:attribute name="href"> ./<xsl:value-of select=".//prop:latest-version/@objid"/>/indexMeta </xsl:attribute>metaData</a><br/> <a><xsl:attribute name="href"> ./<xsl:value-of select=".//prop:latest-version/@objid"/>/origRef </xsl:attribute>md-fox</a><a><xsl:attribute name="href"> ./<xsl:value-of select=".//prop:latest-version/@objid"/>/origRef?mode=html </xsl:attribute>(html)</a> </div> <div class="result showEntry"><a><xsl:attribute name="href"> ./<xsl:value-of select=".//prop:latest-version/@objid"/>/display </xsl:attribute>display</a></div> </xsl:template> <xsl:template match="container:container" mode="content"> <div class="result displayType">Collection</div> <xsl:apply-templates select=".//dc-md" mode="dc"/> <div class="result showEntry"><a><xsl:attribute name="href">container/<xsl:value-of select="@objid"/> </xsl:attribute>show</a></div> </xsl:template> <xsl:template match="search-result:text-fragment-data"> <div class="textFragmentData"> <xsl:copy-of select="."/> </div> </xsl:template> <xsl:template match="srel:context"> <xsl:if test="@objid='escidoc:1001'"><div class="result searchLogo"><img height="40px" src="http://echo.mpiwg-berlin.mpg.de/home/img/echo_sm.gif"/></div></xsl:if> <xsl:if test="@objid='escidoc:12001'"><div class="result searchLogo"><img height="40px" src="http://www.mpiwg-berlin.mpg.de/en/images/logo.png"/></div></xsl:if> <xsl:if test="@objid='escidoc:40001'"><div class="result searchLogo"><img height="40px" src="http://libcoll.mpiwg-berlin.mpg.de/lib_coll_image"/></div></xsl:if> </xsl:template> <xsl:template match="dc-md" mode="dc"> <div class="result resultTitle"><xsl:value-of select="dc:title"/> </div> <div class="result resultAuthor"><xsl:value-of select="dc:creator"/> </div> <div class="result resultDescription"><xsl:value-of select="dc:description"/> </div> <div class="result resultYear"><xsl:value-of select="dc:year"/> </div> <div class="result resultDate"><xsl:value-of select="dc:date"/> </div> </xsl:template> </xsl:stylesheet>