1 <?xml version="1.0" encoding="utf-8"?>
2 <?xml-stylesheet type="text/xsl" href="http://www.loc.gov/standards/sru/bibframe/fullDisplay.xsl"?>
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:srw="http://www.loc.gov/zing/srw/"
5 xmlns:sru="http://docs.oasis-open.org/ns/search-ws/sruResponse"
6 xmlns:dc="http://www.loc.gov/zing/srw/dcschema/v1.0/"
7 xmlns:zr="http://explain.z3950.org/dtd/2.0/"
8 xmlns:diag="http://www.loc.gov/zing/srw/diagnostic/"
9 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
10 xmlns:bf="http://bibframe.org/vocab/"
13 <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
15 <xsl:template match="text()"/>
17 <xsl:template match="rdf:RDF">
18 <xsl:variable name="base" select="bf:Work[1]/@rdf:about"/>
20 <xsl:for-each select="bf:*">
21 <tr><td><b><xsl:value-of select="name(.)"/>:</b>
22 <xsl:variable name="n" select="@rdf:nodeID"/>
24  (<a name="{$n}"><xsl:value-of select="$n"/></a>)
26 <xsl:if test="@rdf:about and @rdf:about != $base">
27 <xsl:variable name="bnodedid">
28 <xsl:value-of select="substring-after(@rdf:about, $base)"/>
29 </xsl:variable> (<a name="{$bnodedid}"><xsl:value-of select="$bnodedid"/></a>)</xsl:if>
31 <xsl:for-each select="*">
32 <xsl:variable name="lang" select="@xml:lang"/>
33 <xsl:if test="not($lang='x-bf-hash')">
34 <xsl:variable name="resource" select="@rdf:resource"/>
35 <xsl:variable name="nodeid" select="@rdf:nodeID"/>
39 <b><xsl:value-of select="name(.)"/>:</b>
43 <xsl:when test="bf:Provider">
44 <xsl:for-each select=".//bf:providerRole">
45 <xsl:value-of select="."/><br/>
47 <xsl:for-each select=".//bf:providerName">
48 <b>Name: </b><xsl:value-of select="."/><br/>
50 <xsl:for-each select=".//bf:providerPlace">
51 <b>Place: </b><xsl:value-of select="."/><br/>
53 <xsl:for-each select=".//bf:providerDate">
54 <xsl:value-of select="."/><br/>
56 <xsl:for-each select=".//bf:copyrightDate">
57 <xsl:value-of select="."/><br/>
60 <xsl:when test="$resource">
61 <xsl:variable name="rvalue" select="//*[@rdf:about=$resource]/*[1]/text()"/>
63 <xsl:when test="$rvalue">
64 <xsl:value-of select="$rvalue"/> (<a>
65 <xsl:attribute name="href">
66 <xsl:value-of select="concat('#',substring-after($resource, $base))"/>
68 <xsl:value-of select="substring-after($resource, $base)"/></a>)</xsl:when>
71 <xsl:attribute name="href">
72 <xsl:value-of select="$resource"/>
74 <xsl:value-of select="$resource"/>
79 <xsl:when test="$nodeid">
80 <xsl:variable name="rvalue"
81 select="../../..//*[@rdf:nodeID=$nodeid]/*[1]"/>
83 <xsl:when test="$rvalue">
84 <xsl:value-of select="$rvalue"/>
85  (<a><xsl:attribute name="href">#<xsl:value-of select="$nodeid"/></xsl:attribute><xsl:value-of select="$nodeid"/>)</a>
88 <xsl:value-of select="$nodeid"/>
92 <xsl:when test="bf:Identifier">
93 <xsl:for-each select="bf:Identifier/*">
96 select="substring-after(name(.),'bf:identifier')"/>:
98 <xsl:value-of select="."/><br/>
102 <xsl:value-of select="."/>
113 <xsl:template match="/">
114 <xsl:call-template name="html"/>
117 <xsl:template name="html">
120 <title>BIBFRAME Full Display</title>
121 <link href="css.css" rel="stylesheet"
122 type="text/css" media="screen, all"/>
123 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
127 <xsl:apply-templates/>
133 <xsl:template match="srw:searchRetrieveResponse">
134 <h2>Search Results</h2>
135 <xsl:call-template name="diagnostic"/>
136 <xsl:call-template name="displaysearch"/>
139 <xsl:template name="diagnostic">
140 <xsl:for-each select="//diag:diagnostic">
141 <div class="diagnostic">
142 <!-- <xsl:value-of select="diag:uri"/> -->
143 <xsl:text> </xsl:text>
144 <xsl:value-of select="diag:message"/>
145 <xsl:text>: </xsl:text>
146 <xsl:value-of select="diag:details"/>
151 <xsl:template name="displaysearch">
152 <div class="searchresults">
153 <xsl:for-each select="srw:numberOfRecords">
155 <xsl:text>Number of Records: </xsl:text>
156 <xsl:value-of select="."/>
159 <xsl:for-each select="srw:records">
160 <xsl:for-each select="srw:record">
163 <xsl:text>Record </xsl:text>
164 <xsl:value-of select="srw:recordPosition"/>
167 <xsl:if test="srw:recordPacking='string'">
169 <xsl:value-of select="srw:recordData"/>
172 <xsl:if test="srw:recordPacking='xml'">
174 <xsl:when test="srw:recordSchema='marcxml'">
175 <xsl:text>MARCXML</xsl:text>
177 <xsl:when test="srw:recordSchema='bibframe'">
178 <xsl:apply-templates select="srw:recordData"/>
183 <form name="rawlink" method="get">
184 <input type="hidden" name="version">
185 <xsl:attribute name="value">
187 select="//srw:echoedSearchRetrieveRequest/srw:version"/>
190 <input type="hidden" name="operation" value="searchRetrieve"/>
191 <input type="hidden" name="query">
192 <xsl:attribute name="value">
194 select="//srw:echoedSearchRetrieveRequest/srw:query"/>
197 <input type="hidden" name="recordPacking">
198 <xsl:attribute name="value">
199 <xsl:value-of select="srw:recordPacking"/>
202 <input type="hidden" name="recordSchema">
203 <xsl:attribute name="value">
204 <xsl:value-of select="srw:recordSchema"/>
207 <input type="hidden" name="startRecord">
208 <xsl:attribute name="value">
209 <xsl:value-of select="srw:recordPosition"/>
212 <input type="hidden" name="maximumRecords" value="1"/>
213 <input type="submit">
214 <xsl:attribute name="value">
215 <xsl:text>Raw Record </xsl:text>
216 <xsl:value-of select="srw:recordPosition"/>