<?xml version="1.0" encoding="utf-8"?>
+<?xml-stylesheet type="text/xsl" href="http://www.loc.gov/standards/sru/bibframe/fullDisplay.xsl"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:srw="http://www.loc.gov/zing/srw/"
xmlns:sru="http://docs.oasis-open.org/ns/search-ws/sruResponse"
<xsl:template match="text()"/>
<xsl:template match="rdf:RDF">
+ <xsl:variable name="base" select="bf:Work[1]/@rdf:about"/>
<table>
<xsl:for-each select="bf:*">
- <tr><td><xsl:value-of select="name(.)"/></td></tr>
- <xsl:for-each select="./*">
- <xsl:variable name="resource" select="./@rdf:resource"/>
- <tr>
- <td/><td><xsl:value-of select="name(.)"/></td>
- <td/><td>
- <xsl:if test="$resource">
- <xsl:variable name="rvalue"
- select="//*[@rdf:about=$resource]/*[1]"/>
- <xsl:choose>
- <xsl:when test="$rvalue">
- <xsl:value-of select="$rvalue"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$resource"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <xsl:value-of select="."/>
+ <tr><td><b><xsl:value-of select="name(.)"/>:</b>
+ <xsl:variable name="n" select="@rdf:nodeID"/>
+ <xsl:if test="$n">
+  (<a name="{$n}"><xsl:value-of select="$n"/></a>)
+ </xsl:if>
+ <xsl:if test="@rdf:about and @rdf:about != $base">
+ <xsl:variable name="bnodedid">
+ <xsl:value-of select="substring-after(@rdf:about, $base)"/>
+ </xsl:variable> (<a name="{$bnodedid}"><xsl:value-of select="$bnodedid"/></a>)</xsl:if>
+ </td></tr>
+ <xsl:for-each select="*">
+ <xsl:variable name="lang" select="@xml:lang"/>
+ <xsl:if test="not($lang='x-bf-hash')">
+ <xsl:variable name="resource" select="@rdf:resource"/>
+ <xsl:variable name="nodeid" select="@rdf:nodeID"/>
+ <tr>
+ <td/>
+ <td>
+ <b><xsl:value-of select="name(.)"/>:</b>
+ </td>
+ <td/><td>
+ <xsl:choose>
+ <xsl:when test="bf:Provider">
+ <xsl:for-each select=".//bf:providerRole">
+ <xsl:value-of select="."/><br/>
+ </xsl:for-each>
+ <xsl:for-each select=".//bf:providerName">
+ <b>Name: </b><xsl:value-of select="."/><br/>
+ </xsl:for-each>
+ <xsl:for-each select=".//bf:providerPlace">
+ <b>Place: </b><xsl:value-of select="."/><br/>
+ </xsl:for-each>
+ <xsl:for-each select=".//bf:providerDate">
+ <xsl:value-of select="."/><br/>
+ </xsl:for-each>
+ <xsl:for-each select=".//bf:copyrightDate">
+ <xsl:value-of select="."/><br/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:when test="$resource">
+ <xsl:variable name="rvalue" select="//*[@rdf:about=$resource]/*[1]/text()"/>
+ <xsl:choose>
+ <xsl:when test="$rvalue">
+ <xsl:value-of select="$rvalue"/> (<a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat('#',substring-after($resource, $base))"/>
+ </xsl:attribute>
+ <xsl:value-of select="substring-after($resource, $base)"/></a>)</xsl:when>
+ <xsl:otherwise>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$resource"/>
+ </xsl:attribute>
+ <xsl:value-of select="$resource"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$nodeid">
+ <xsl:variable name="rvalue"
+ select="../../..//*[@rdf:nodeID=$nodeid]/*[1]"/>
+ <xsl:choose>
+ <xsl:when test="$rvalue">
+ <xsl:value-of select="$rvalue"/>
+  (<a><xsl:attribute name="href">#<xsl:value-of select="$nodeid"/></xsl:attribute><xsl:value-of select="$nodeid"/>)</a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$nodeid"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="bf:Identifier">
+ <xsl:for-each select="bf:Identifier/*">
+ <b>
+ <xsl:value-of
+ select="substring-after(name(.),'bf:identifier')"/>:
+ </b>
+ <xsl:value-of select="."/><br/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
</td>
- </tr>
+ </tr>
+ </xsl:if>
</xsl:for-each>
</xsl:for-each>
</table>
<xsl:template name="html">
<html>
<head>
- <title>Full Display</title>
+ <title>BIBFRAME Full Display</title>
<link href="css.css" rel="stylesheet"
type="text/css" media="screen, all"/>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div class="body">
<xsl:for-each select="srw:records">
<xsl:for-each select="srw:record">
<div class="record">
- <p>
- <xsl:text>Record: </xsl:text>
+ <h4>
+ <xsl:text>Record </xsl:text>
<xsl:value-of select="srw:recordPosition"/>
- <xsl:text> : </xsl:text>
- <xsl:value-of select="srw:recordSchema"/>
- <xsl:text> : </xsl:text>
- <xsl:value-of select="srw:recordPacking"/>
- </p>
+ </h4>
<p>
<xsl:if test="srw:recordPacking='string'">
<pre>
</xsl:if>
<form name="rawlink" method="get">
- <input type="hidden" name="version" value="1.2"/>
+ <input type="hidden" name="version">
+ <xsl:attribute name="value">
+ <xsl:value-of
+ select="//srw:echoedSearchRetrieveRequest/srw:version"/>
+ </xsl:attribute>
+ </input>
<input type="hidden" name="operation" value="searchRetrieve"/>
<input type="hidden" name="query">
<xsl:attribute name="value">
</div>
</xsl:template>
-</xsl:stylesheet>
+</xsl:stylesheet>
\ No newline at end of file